Question

We're using a Tibco client implementation of the JMS API. We have a MessageListener with an onMessage() implementation.

Is there a way with the Tibco client to inspect past (received) messages in the queue? (I realise this totally ignores the logical concept of a queue - I wondered if the queue implementation provided this workaround.)

Was it helpful?

Solution

No. Not for "past" messages.

Messages acknowledged by the receiver are removed from the queue - as their "function" is already done.

You could have a Listener configured to persist your messages in some DB or file - but for future messages.

OTHER TIPS

A client uses a QueueBrowser object to look at messages on a queue without removing them.

@hawkeye Its not possible to browse messages from the past... At any point of time , you can browse destinations only for the pending messages.

There is no way for you browse all the received messages as EMS server usually deletes the message once it has delivered ( acknowledged) for the given delivery mode.
One possible way is to a send copy of the messages to another queue (without any receivers) before actually confirming  the messages.
Also it depends on your acknowledgement mode and logic involved.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top