Question

Tibco stores messages in a data file or in database. I need to browse old messages posted to a topic or queue. Does EMS provide any API for searching old/consumed messages? Suppose I have a topic complexEvent.topic at time t1 a publisher publishes a message to complexEvent.topic, at time t2 a consumer consumes the message. Say after 2 hours from t2 I need to view all messages posted between t1 and t1+ 10 (minutes) to topic complexEvent.topic. How can I search old messages?

Was it helpful?

Solution

EMS does not store copies of messages by design : A MOM is not a DBMS, and a MOM should normally be optimized for performance.

For a SPECIFIC and PUNCTUAL need such as yours, I would simply create an EMS bridge (Similar to MQ Alias, see EMS doc) from the Destination(Topic,Queue) you want to log to a "DESTINATIONNAME.log" QUEUE. This way, the current code and destination are unaffected.

After that, you could use a Java QueueBrowser and MessageSelector to search for messages in your log queue. See this Oracle Documentation for details.

Don't forget to clean up the queue (You could also set up a message limit and overflow strategy).

If performances are critical, consider storing the logging queues on different EMS instances.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top