[
https://issues.apache.org/jira/browse/AMQ-5688?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timothy Bish closed AMQ-5688.
-----------------------------
Resolution: Fixed
Tested as working in latest snapshot.
> JMSRedeilivery not set if Consumer restarted.
> ---------------------------------------------
>
> Key: AMQ-5688
> URL: https://issues.apache.org/jira/browse/AMQ-5688
> Project: ActiveMQ
> Issue Type: Bug
> Affects Versions: 5.11.1
> Reporter: Tim Burrage
>
> With a Client Acked session:-
> session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
> Pull a message off the broker:-
> Message message = consumer.receive(1000);
> Now kill the consumer JVM. Restart the consumer and pull a message off the
> consumer; it's the same message as received in the previous run, but
> JMSRedelivered=false, redeliveryCounter=0.
> I've tried recovering the session before I read the first message off the
> queue (session.recover();) but this has no impact.
> If however I read the first message AND THEN recover the session (not acking
> the just received message), the message is re-delivered and
> JMSRedelivered=true, redeliveryCounter=1.
> I have tried with a transacted Consumer (session =
> connection.createSession(true, Session.SESSION_TRANSACTED);) this has the
> same problem, but I can't solve it with session.recover() as it's transacted.
> This is a master/slave setup with 3 brokers. I am not restarting the broker
> between tests, simply killing the Consumer JVM
> I've set persistJMSRedelivered, but this has no impact
> <destinationPolicy>
> <policyMap>
> <policyEntries>
> <policyEntry topic=">" persistJMSRedelivered="true">
> <pendingMessageLimitStrategy>
> <constantPendingMessageLimitStrategy limit="1000"/>
> </pendingMessageLimitStrategy>
> </policyEntry>
> </policyEntries>
> </policyMap>
> </destinationPolicy>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)