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

Gary Tully resolved AMQ-2087.
-----------------------------

    Resolution: Working as Designed

This is a case of amq treating delivery as delivery to the consumer session 
rather than to the actual consumer implementation. In the test case, all of the 
10 messages get redelivered to each consumer and they very quickly reach the 
default max redelivery count of 6 and get sent to the DLQ!

one solution is to configure the redelivery policy:
{code}ConnectionFactory connectionFactory =
     new 
ActiveMQConnectionFactory("vm://localhost?jms.redeliveryPolicy.maximumRedeliveries=100");
 {code}

An alternative is to use prefetch=0 so that each consumer will only get what it 
can use.

There are a bunch of related open issues on this behavior, with the wire format 
change in 6.0 it will be possible to address this. A subscription remove 
command needs to indicate to the broker the last delivered ack that it has 
produced. An alternative is that the subscription trys to keep track of this 
information (which may be simpler).

Is it ok to close this as there are so many open related issues: see: 
https://issues.apache.org/activemq/secure/IssueNavigator.jspa?reset=true&&query=redelivery&summary=true&description=true&body=true&type=1&pid=10520&status=1
 

> Redelivery after rollback does not seem to work well 
> -----------------------------------------------------
>
>                 Key: AMQ-2087
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2087
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.2.0
>            Reporter: Guillaume Nodet
>            Assignee: Gary Tully
>             Fix For: 5.3.0
>
>         Attachments: AMQ-2087.test.diff
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to