Weblog

All | Personal | Sun
« Previous day (Nov 23, 2005) | Main | Next day (Nov 24, 2005) »
20051124 Thursday November 24, 2005

JMS message browser Last post I started develop JMS application that receives order messages. I encountered some problems with the MDB bean during testing this bean. Therefore, these messages weren't delivered and processed. The main advance of the JMS is that no message is lost and JMS mechanisms guarants delivery of messages between clients. However, there are cases where guaranteed delivery, acknowledgements, and transactional are just not enough. Many conditions can cause a message to be undeliverable. Messages may expire before they reach customer or they are viewed as undeliverable due to some reason. What's hapenned with these messages?
They are delivered in some special queue, 'Dead Message Queue'. Messaging server that is bundled in Sun Application server has this admin queue. The name of this queue is mq.sys.dmq. How we can browse the messages that are in the dead queue?
Very simple, you can use QueueBrowser example that is in imq/demo/applications/qbrowser directory in Sun App server. Start the application with this option:

     java -cp $J2EE_HOME/imq/lib/jms.jar:$J2EE_HOME/imq/lib/imq.jar:. QBrowser
   
In text field specify name of your or dead queue and click Browse. Then, you can select a message and click Browse, in new dilog all information about message are displayed. There you can check message body, reason of undelivery, JMS delivery count, ...This tool is very helpful when you need to analyze messages that are in appropriate queue. After analyzing these messages you want to purge them. Messages can be deleted from admin console that was described two days ago. Undar Actions menu is Purge Messages item.
Posted by pblaha ( Nov 24 2005, 07:41:16 PM CET ) Permalink Comments [0]

Calendar

RSS Feeds

Search

Links

Navigation

Referers

Older blog entries