As Art says, the advantages are minor, and the disadvantages (such as the inability to detect disconnections due to network problems) are not. So your default should be to use a non-zero value unless you come up with a clear reason why you think a value of zero would be better for you, and clearly you don't have one of those at the moment.
If you start getting the "Channel was inactive for too long" log lines regularly, then you'll need to investigate what's going on in your network or on your brokers to figure out why keep-alives aren't making it to their destinations in time. Contrary to whatever you may have read, the solution to seeing those log lines is to figure out what's going wrong to cause them in the first place, not to turn them off and assume that everything's fine. But only if you're seeing them regularly; if you saw this once a long time ago, I wouldn't worry about it -- once in a blue moon is probably just a network hiccup, and you only need to worry about it when it becomes a pattern. Tim On Tue, Dec 2, 2014 at 12:49 PM, artnaseef <a...@artnaseef.com> wrote: > Setting maxInactivityDuration to 0 disables the activity monitor. The > advantages include reducing the overhead when there are large numbers of > idle connections, and eliminating forced disconnects on slow connections > that are otherwise active. > > These seem like minor advantages. The overhead is really low, and can be > reduced by increasing the inactivity duration. And it is valuable to > disconnect connections that are really inactive. > > Note that - just because there is a setting, doesn't mean there's really a > "good" reason to use it. Often settings are added as a means to try > different approaches, or to allow for backward compatibility when new > features are added. They may even be only useful when troubleshooting a > problem. > > Hope this helps. > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/when-should-you-set-maxInactivityDuration-0-tp4688281p4688289.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >