I am trying to consume 1 Million messages from a Queue using 10 concurrent consumers (Threads) . Consumption hangs after consuming 777,000 messages. i.e. even though I am able to see the messages from JConsole, Consumers does not read any. Any help would be highly appreciated.I have opened an issue in JIRA attaching source code and instructions to reproduce this - https://jira.jboss.org/jira/browse/JBMESSAGING-1693

One thing that exacerbates the issue is that you are acknowledging every message when you only need to ack 1.

from the spec:

CLIENT_ACKNOWLEDGE - With this option, a client acknowledges amessage by calling the message's acknowledge method. Acknowledging aconsumed message automatically acknowledges the receipt of all messagesthat have been delivered by its session.

If you change this then you should be able to consume all the messages.

If I want to process messages and acknowledge each message only if the processing succeeds, How would I do that in JBM? i.e I want to consume all messages but ACK only a few of them. I mean something like Java Message Queue's Message.acknowledgeThisMessage().

I saw that Andy closed your Jira saying that fix was done.I have the same problem like you - Is it working for you with trunk build?

Thought Andy will comment what he fixed but didnt see any explanation.At my company we're thinking to use the JBoss core API instead of JMS - I see benefit on that but not sure how it will evolve in the future.