Retrieve Number of JMS Message retry

ejb-3.0jakarta-eejboss5.xjmstransactions

I am using JMS Queue, and MDB which listen to it.
I have a retry mechanism, so when exception is being thrown a rollback to the transaction will occur and the operation will re-executed/

I would like to achieve the Message_retry_number, each time "onMessage" being executed, so I can write the current execution retry number.
I heard I can retrieve it through the Header of the message object, but couldn't find anything in the properties or in the net.

anyone has any clue?

Thanks,
ray.

Best Answer

See javax.jms.Message.getIntProperty. Property name is "JMSXDeliveryCount".

Related Topic