views:

422

answers:

1

I need to implement handling of redelivery of JMS messages in the application that is deployed on the IBM-backed environment, so JMS provider is standalone MQ V6.0.

Do you know if it is setting JMSXDeliveryCount property correctly and I can rely on the values of this very property?

+1  A: 

I've just found the answer for my question :)

The IBM WebSphere MQ sets the following JMSX* header properties:

JMSXUserId will be set by WMQ JMS when you send the message - it looks at the userid running the application and sets JMSXUserId accordingly.

JMSXAppId will also be set by WMQ JMS when you send the message - to something like "WebSphere MQ Client for Java". There is some debate over how to interpret the JMS Spec on this one - some JMS providers allow an application to set it, others don't. Currently, the WebSphere MQ implementation does not.

JMSXDeliveryCount will be set by WMQ JMS when the message is sent on to a receiving application - it tells that receiving application how many times WebSphere MQ has tried to deliver the message to that or other applications. Normally, messages should only be delivered once, but in the case of failures or explicit rollback of transactions etc., the delivery count may get higher, and applications or JMS providers can use that information to spot when things are going wrong and perhaps do something different like moving the message to a dead letter queue, or even discard the message, depending on the nature of the message, the application and the context.

pregzt