blob: f37823a69ab99885482f7e4b33f7685df9be5361 [file] [log] [blame]
<div class="wiki-content maincontent">
<p>If you want to consume messages in a different order, or consume specific messages at the head, middle or tail of the queue, you can</p>
<ul><li>browse the messages using the QueueBrowser to find the JMSMessageID's of the messages you want to consume</li><li>create a new consumer with a selector matching the ID(s) you want.</li></ul>
<p>e.g. here is an example selector</p>
<structured-macro ac:macro-id="8edc4aec-e914-4d4b-912f-59a0a0fccd19" ac:name="code" ac:schema-version="1"><plain-text-body>
JMSMessageID = 'abc'
</plain-text-body></structured-macro>
<p>Note that this is not a very efficient way of working with JMS (JMS is designed for consumers to be long lived objects working across many messageS), but it can be useful in certain situations.</p>
<p>Another option is just to use <link><page ri:content-title="JMX"></page></link> directly to browse messages on a queue, process them and then delete them.</p></div>