
|
I used openjms to develop this example. Check out this Q&A first! The following example receives a message asynchronously from the testqueue queue. The acknowledgement mode is set to AUTO_ACKNOWLEDGE, which means that the session will automatically acknowledges a client's receipt of a message. With asynchronous reception, the onMessage method of your implementation of MessageListener is called when there is a message available on the queue. To receive message synchronously, check this Q&A. Main.java:
Further Information Author of answer: Joris Van den Bogaert Comments to this answer are only viewable by members. Login or become a member! |