views:

219

answers:

1

I wonder, if there JMS broker, that allows administrators to resend (via GUI or any tool) messages, saved in a ded message queue or dead letter queue, after solving the causing problem (e.g. database is down, not enough space...).

WebSphere provide a feature to resend messages saved in dead letter queue: 1
Glassfish 2.1.1 using Sun Java System Message Queue 4.4 has no feature to do this, I think so.

What are the options on other JMS brokers? Or is the best way, not to use the DMQ/DLQ feature, if you are depend on a message?

Thanks a lot

+1  A: 

I can answer for WebSphere MQ but not for any other JMS providers. In the case of WMQ there are several tools, including the Dead Letter Handler (DLH) which can automatically retry DLQ messages for transient errors like QFULL. For example, a queue fills up and the inbound messages overflow to the DLQ. The DLH will begin to retry these messages and as the queue drains it will automatically replace them in the original target queue. Other tools are available as WMQ SupportPacs.

The general rule of thumb is that you must have some process to deal with poison messages. Ideally this will be an application-specific exception queue because the system DLQ is shared. I have seen a number of cases where multiple apps spilled messages to the DLQ and the support team for one of the apps cleared the entire queue instead of just their messages. Not good.

One other note of caution is that messages landing on the DLQ usually results in disruption of the message sequence. For example, a queue fills and messages go to the DLQ. As the queue drains, messages are replayed from the DLQ at which point they are interspersed with new messages as those arrive. Ideally the app is not sensitive to message sequencing issues and each message is atomic. This is the key to answering your final question. Whether you use the DLQ depends a lot more (at least in WMQ) on whether the app is sensitive to message sequencing. If sequencing is an issue then you don't have the option to let the messages spill over to a secondary queue and replay them while new messages are still arriving. Better in that case to let the queue fill and throttle back or shut down the sending app.

You can read more on the DLH here: http://bit.ly/aYJ13q

WMQ SupportPacs are here: http://bit.ly/bdSUfd (Check out MA01 and MO01)

T.Rob
Thank's alot. My messages are atomic and the order is not important.
marabol