Description
In ActiveMQMessageConsumer, currently the rollback cause is only set for the case auto- or individual-acks. However, it should also be set for the other cases, so that in the rollback() method it can be picked up when creating the poison ack.
if (isAutoAcknowledgeBatch() || isAutoAcknowledgeEach() || session.isIndividualAcknowledge()) { // schedual redelivery and possible dlq processing md.setRollbackCause(e); rollback(); } else { // Transacted or Client ack: Deliver the next message. afterMessageIsConsumed(md, false); }
I'd suggest to move md.setRollbackCause(e); to before the if().
Attachments
Attachments
Issue Links
- is related to
-
AMQNET-513 Exception message is not propagated in case of consumption failure
- Resolved
-
AMQCPP-588 Always set a rollback cause on exception thrown in onMessage
- Resolved