Mmm, I misunderstood what you'd written about where the bottleneck was occurring. Based on what you've said, it sounds like maybe your cursor is getting full of messages for which no consumer exists (maybe because they're in a session that was already closed?) and therefore the broker can't pull out any of the messages matching the selectors of consumers that are actually connected. That's pure speculation on my part, but it might be what's going on. But it can only explain the problem if message TTL wasn't being set (or was being set to a very large value, such that your messages weren't expiring fast enough). Can you browse the queue and inspect the messages on it and confirm that the JMSExpiration header really is set and that it's set to a value that's what you expect? If it's set, then my guess is probably wrong, but if it's not, then fix the code that's trying to set it and see if this problem disappears...
On Tue, Jan 13, 2015 at 10:08 AM, xabhi <xabh...@gmail.com> wrote: > The producer is not blocked as the msgHeld value keeps increasing, its the > consumer that stops consuming messages. > > >>Also, I was under the impression that it wasn't possible to set message > TTL > on the broker and that it could only be set by the producer; > > Yes, sorry about that it can be set by producer only, but you can do that > by > overriding send method of BrokerPluginSupport class to set message TTL when > broker receives a message (which we do in cases where producer hasn't > specified any message TTL value). > > Thanks, > Abhi > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Consumer-not-able-to-consume-messages-from-queue-tp4689594p4689858.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >