Hi,
I’m currently looking at using the Java UM Admin API to create a UI that will be able to view the messages on our Queues/Topics, without consuming them. I’ve been following the Universal Messaging Developer Guide, and have found it easy to do for the Queues, utilizing the nQueueReader class’s ‘peek’ method.
However I have had great difficulty in doing the same for Topics, I can see no way around being able to view the content of the message without actually consuming it.
Any help with this would be greatly appreciated!
Thanks,
Max
Hi Max ,
The messages published to the Topic will be lost if there are no active subscribers , that’s how the Topic works.
Topic is like a Radio Broadcasting station , it publishes the messages if your Radio subscriber is on you can receive the message.
You can try using Topic(Durable Subscriber) , in this case durable subscriber will store the message within itself untill some subscriber picks the message or time to live for the message expires.
To add to this:
Durable subscribers do provide APIs to view individial messages, and these will also be viewable in Command Central in the upcoming 10.0 release.
Thank you for getting back to me Rakesh and Jonathon.
So if there is a durable subscriber that has yet to consume a message, that message will remain on the Topic until it has? Is there a way to be able to view the content of that message while it is on the Topic still?
Kind regards,
Max
Max,
that is correct.
If the durable subscriber is a shared-durable, then the message actually resides in a hidden queue, but the effect is the same.
The API to do this is not in current releases; it is new for the 10.0 release due out in April.
Hi again Jonathan,
I want to be able to give the users of the UI the ability to purge the Queues of the messages of their selection. I’ve noticed that where the nChannel class’ ‘purge’ function offers the ability to purge from and to particular event IDs, the nQueue class does not offer the same. Seemingly the only options are to purge all of the events from the queue, or supply a selector and purge a sub-selection based on the nProperties of the event.
One way I have thought of, that may be bad practice, is to use a nQueueSyncTransactionReader to simply consume the events that are to be purged. (All events from the queue would be consumed, but only committed if wanted to be purged).
I was wondering if you’d be able to shed some light please?
Kind regards,
Max