-
1. Discarding redelivered messages
clebert.suconic May 10, 2011 10:29 AM (in response to sergiu_pienar)Max Redelivery and DeadLetterAddress (AKA DLQ). Look for it at the manual.
-
2. Re: Discarding redelivered messages
sergiu_pienar May 12, 2011 4:08 AM (in response to clebert.suconic)Hi Clebert,
Thx for the response.I know about the DLA and maxRedeliveryAttempts ... but they do not apply to my scenario.
I have maxRedeliveryAttempts set to 3.
The flow is the following :1. start transaction
2. send JMS message
3. transaction.rollBack
In this case the sent JMS message should never be delivered and it should be discarded.
Unfortunately we observed that indeed message is not processed as long as JBoss is running, but somehow, at JBoss restart, this message is processed.
Where is this JMS messages stored till JBoss restart and why hornetq doesn't observe that it is a discarded message?
I do not want the message to be redelivered when I restart my server because the context in which the message was sent isn't valid anymore and if my message gets reprocessed it will trigger some actions that will not be consistent within the current scenario.
Does the message has some sort of a flag set on it when it is involved on a transaction that is rolled-back so I can treat it in a special manner ?
Message was edited by: Sergiu Pienar
Message was edited by: Sergiu Pienar
-
3. Re: Discarding redelivered messages
sergiu_pienar May 23, 2011 3:03 AM (in response to sergiu_pienar)I have to do Mea Culpa as I tested in a wrong scenario.
Thx.