So you're using ActiveMQ, Camel, and Spring, and the problem (whether it's your error or a bug) could be in any of them. I've got to say, given that this isn't clearly a problem with any one of those technologies, I'd post this to StackOverflow and tag it with all three technologies and hope that someone from the right technology who knows what might cause this sees it.
My instinct tells me this isn't an ActiveMQ issue (I'd suspect Camel if I was forced to pick one since they're managing the customers, though if consumer threads are hung that's probably a Spring problem), but it really could be any of the three (and we're all probably going to suspect the problem lies with the others; sorry, I know it's not fun when people say "not our problem, check with the other guys"). For your other questions: - If you're using asyncSend and the broker restarts, I believe that the already-sent messages will be lost. - I'd be very surprised if this had to do with maxInactivityInterval, though anything's possible. But 5 minutes seems like a long time to wait before declaring a connection dead... - If the default recoveryInterval of 5 seconds isn't preventing the disappearance of consumers, I'm not sure how a different value would change that behavior. - Does this only happen when you restart the broker? Or does it also happen when all processes are up and connected? Tim On Fri, Oct 9, 2015 at 8:16 AM, dhananjay.patkar <dhananjay.pat...@gmail.com > wrote: > I am able to reproduce this issue by restarting the broker, when camel > consumers are sending those millions of messages on the queue. > > I am planning to set recoveryInterval on the camel JmsConfiguration, please > post your views on this. > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/ActiveMQ-consumer-count-is-set-to-0-tp4675930p4702810.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >