Hi All, Acc to what I have read it should not matter whether a consumer receive messages from a queue synchronously or asynchronously, A queue always has one subscriber and once the message is consumed it is removed from the queue.
Even after the message has been received from the queue, the message is still available if I look via JMX on JBOSS- listMessages. Why is that the case? Shouldnt the message be deleted from the queue once it is consumed?
When I try a client with a synchronous receiver the message is deleted from the JBOSS queue and everythings fine.
Could it be that in the MessageListener's onMessage method, I need to do something specific that removes it from the client side.
Code is as follows =======================================================================