There is always one more "InProcess" message than there should be?
I've sent two messages to a queue and created a MessageListener or singleton MDB to read the messages.
When the first message arrives, I can't see the second message using a QueueBrowser. Where has it gone?
This is the read ahead processing within JBossMQ, when you configure it in full asynchronous mode (
i.e. messages are "pushed" from the server to the client's "onMessage()" rather than "receive()" being invoked by the client).
It will deliver the first available message.
While that is being processed, it will go back to the server to get the next message.
This will wait on the client side until the first message was processed, it is no longer
visible in the queue. You can see it in the "InProcess" messages using the JMX interface.
This is obviously more efficient than waiting for the client to finish the onMessage() and only then going to the server to get the next message. A message will usually be ready to be processed as soon as the previous one has been completed.
How do I change this behaviour
This is not configurable within JBossMQ.
Try JBoss Messaging.
Don't use the full asynchronous mode
There are no plans to change it since JBossMQ is in "bug fix only". That is unless somebody provides a patch or pays for the development to occur.
Old feature request that was never done now closed since no new development is being done on JBossMQ.