Is it possible to monitor all Messages published to a Queue?

Posted by jhenson on 02-Jun-2011 06:18

Some JMS providers have a facility that allows all messages published to a queue to be monitored without having to consume them.  For example, Tibco EMS allows clients (with sufficient privileges) to subscribe to administrative topics on which copies of Messages are published when a specific event (e.g. a Message is received by a Queue) occurs.

Is it possible to do this with Sonic MQ?  The Sonic Event Monitor exposes a rich set of metrics, but it doesn’t seem to provide a way to get hold of messages in this fashion.

Using a MessageBrowser isn’t sufficient as it doesn’t guarantee that all messages will be seen.

All Replies

Posted by tsteinbo on 03-Jun-2011 04:46

I am not aware of such a feature in Sonic but wanted to point out that if the destination is a Topic you can already get a copy by having another subscriber. For queues that is not possible though.

Having said that: SonicMQ makes it easy to use topics as queues (1 sender - 1 receiver semantics) by using group subscription. Only one subscriber of a group will get a copy of the message. So if your main message flow uses a single group you retain the queuing semantics.

HTH

Thomas

Posted by jhenson on 03-Jun-2011 12:17

Thanks for your response Thomas.

Yes, with a publish / subscribe model there's no problem receiving messages, unfortunately that's not the scenario that I'm interested in.

The scenario is that there's an existing system that publishes to a Queue and I need to be able to get copies of those messages.  One work around would be to set up a proxy Queue, from which Messages can be consumed for my own purposes and then passed on to the real Queue, but obviously that would require changes to the existing system and so is far from an ideal solution.

Regards,

Jon

Posted by tsteinbo on 06-Jun-2011 06:21

If switching to Topics (with queue semantics) is not possible for you. You can look at Actional instrumentation. That might be a good fit if your main purpose of capturing these messages is logging and visibility anyway.

Thomas

This thread is closed