0
votes

I am writing MDB (EJB3). All I want is when re delivery is exhausted I can send an email alert before dropping message to DLQ. How can this be achieved ?? (I don't have option to browse to DLQ)

I have searched many online posts, Please find my supplementary questions too

  • How to delay MDB startup in Wildfly10?
  • How to set EJB3 MDB activation config from properties file (Without setting them as system properties)?
1
Please limit your question to one actual question. If you have additional questions please create a new question for each one. - Justin Bertram
Did my answer address your question? If not, please clarify what wasn't addressed. If so, please mark the answer as correct to help other users who may have this same question in the future. Thanks! - Justin Bertram

1 Answers

0
votes

There is a message property named JMSXDeliveryCount that indicates how many times the message has been delivered. Section 3.5.11 of the JMS 2. 0 spec says this about JMSXDeliveryCount:

When a client receives a message the mandatory JMS-defined message property JMSXDeliveryCount will be set to the number of times the message has been delivered. The first time a message is received it will be set to 1, so a value of 2 or more means the message has been redelivered.

If the JMSRedelivered message header value is set then the JMSXDeliveryCount property must always be 2 or more. See section 3.4.7 “JMSRedelivered” for more information about the JMSRedelivered message header,

The purpose of the JMSXDeliveryCount property is to allow consuming applications to identify whether a particular message is being repeatedly redelivered and take appropriate action.

The value of the JMSXDeliveryCount property is not guaranteed to be exactly correct. The JMS provider is not expected to persist this value to ensure that its value is not lost in the event of a failure.