Is there a way to remove a JMS message from an IBM MQ Queue using JMSMessageId ina Java application(not using tools)? Also are such operations vendor-specific?
Looked through the API for receive operations which are used to remove messages, but for removing specific messages, do we need to filter using MessageSelector and remove appropriately, or is there a more simple way? [checking for any available method which can be directly used]
Can you please provide tutorials/examples [can be links too] to show the API usage for such operations?
When you use
JMSMessageIDas the only message property in a selector, WMQ optimizes the lookup to be the same as a native WMQ API get byMQMD.MessageIDwhich is an indexed field in the queue. Please see the JMS Message Selection topic for more details.You can also do the same thing using native WMQ API calls using Java native code. You would do a normal
GEToperation but specify the message ID in theMQMDstructure.