I have a Queue in my JMS. While sending messages to the queue I am mentioning the JMStype as 'XYZ'. At the consumer end I have an onMessage listener. What I want to know is the following
- In onMessage listener how do I check for the JMStype of the message without dequeuing the message. If my running instance finds that the JMStype is not 'XYZ' then it should not do anything and should not dequeue it from my queue. Only the instance which needs a message of JMStype 'XYZ' should dequeue the message and process it further.
Thanks for your time to read my query.