blob: 7310b88ca3f9540205a09beb83b8a6d34830a892 [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>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
JMSMessageID = 'abc'
</pre>
</div></div>
<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 <a shape="rect" href="jmx.html">JMX</a> directly to browse messages on a queue, process them and then delete them.</p></div>