[jira] [Updated] (AMQ-6042) In ActiveMQMessageConsumer, always set rollback cause

2015-11-19 Thread Martin Lichtin (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMQ-6042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Lichtin updated AMQ-6042:

Component/s: Broker

> In ActiveMQMessageConsumer, always set rollback cause
> -
>
> Key: AMQ-6042
> URL: https://issues.apache.org/jira/browse/AMQ-6042
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: Broker
>Reporter: Martin Lichtin
> Attachments: MessageListenerRedeliveryTest.java
>
>
> 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.
> {code}
> 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);
> }
> {code}
> I'd suggest to move md.setRollbackCause(e); to before the if().



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (AMQ-6042) In ActiveMQMessageConsumer, always set rollback cause

2015-11-16 Thread Martin Lichtin (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMQ-6042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Lichtin updated AMQ-6042:

Attachment: MessageListenerRedeliveryTest.java

See attached MessageListenerRedeliveryTest.java where I added a test called 
testTransactedQueueSessionListenerExceptionDlq() that is using a transacted 
session.

Without above suggested change to ActiveMQMessageConsumer the test fails 
because the 'cause' is not there. WIth the change, the tests succeeds.

> In ActiveMQMessageConsumer, always set rollback cause
> -
>
> Key: AMQ-6042
> URL: https://issues.apache.org/jira/browse/AMQ-6042
> Project: ActiveMQ
>  Issue Type: Bug
>Reporter: Martin Lichtin
> Attachments: MessageListenerRedeliveryTest.java
>
>
> 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.
> {code}
> 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);
> }
> {code}
> I'd suggest to move md.setRollbackCause(e); to before the if().



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)