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

Timothy Bish commented on ARTEMIS-1004:
---------------------------------------

On the surface of it this does sound like a bug, or at least grounds for an 
enhancement request.  In API docs for getJMSRedelivered while giving a little 
wiggle room imply that it should be true if the Message was in fact "delivered" 
to a client and not acknowledged, delivered in this case having been done when 
the test calls consumer receive and is given each of the two messages.  If the 
message had only sat in the prefetch buffer then it'd be fair to say it wasn't 
delivered but since it was handed over it should be treated as having met the 
criteria of delivery.

For sake of reference the ActiveMQ 5.x client will mark the messages as having 
been delivered in this test and after the session is recovered the message will 
return true for getJMSRedelivered in the INDIVIDUAL_ACKNOWLEDGE mode as it 
normally would for CLIENT_ACKNOWLEDGE.  



> ActiveMQMessage.getJMSRedelivered() is returning false in case of 
> redeliveried message with ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE
> ---------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-1004
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1004
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 1.5.3
>            Reporter: Vishal Agarwal
>         Attachments: EmbeddedExample.java
>
>
> if ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE is used as acknowledgement 
> option and more than one message is re-delivered only first message is having 
> ActiveMQMessage.getJMSRedelivered() as true other messages are returing false.
> Please see the attached java class to reproduce the issue.
> The side effect of this issue is that if we have max-delivery-attempts as 2 
> and 2 messages are not ack, then 1st message will be delivered twice but 2nd 
> message will be delivered 3 times.
> Note: If Session.CLIENT_ACKNOWLEDGE is used then 
> ActiveMQMessage.getJMSRedelivered()  is working fine.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to