On 8/25/06, StanleyH <[EMAIL PROTECTED]> wrote:
Hi, if I create another message (type==NewMessageNotification) and send it
with my message from the producer, and the recipient listens selectively to
NewMessageNotify and then call queuebrowse will that work? thanks.

Yes; you can use selectors on both regular message listeners or on
queue browsers.

Another idea is we could add an interceptor to the broker to add an
incrementing number to each message as a header.

http://incubator.apache.org/activemq/interceptors.html

then you could start off browsing all the messages; then keep track of
the maximum messageCounter header you see. Then you could periodically
poll the queue using a QueueBrowser with a selector for the new
messages you've not seen. e.g. selector

messageCounter > 1234

(where 1234 is the last messageCounter you saw)

Right now the broker attaches a header called JMSTimestamp which is
increasing over time so you could maybe use that?

--

James
-------
http://radio.weblogs.com/0112098/

Reply via email to