You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Timothy Bish (JIRA)" <ji...@apache.org> on 2015/06/10 23:40:01 UTC

[jira] [Commented] (AMQ-5688) JMSRedeilivery not set if Consumer restarted.

    [ https://issues.apache.org/jira/browse/AMQ-5688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14581124#comment-14581124 ] 

Timothy Bish commented on AMQ-5688:
-----------------------------------

You might want to test against a 5.12-SNAPSHOT there has been some work done on improving redelivered.  I tried a quick test here and it worked as I'd expect it to  

> 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)