You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2019/04/17 13:51:00 UTC

[jira] [Commented] (AMQ-7185) XA durable sub prepared acks don't block redelivery

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

ASF subversion and git services commented on AMQ-7185:
------------------------------------------------------

Commit 487d4a112e01777ca128c39033a76dd29155e755 in activemq's branch refs/heads/master from gtully
[ https://gitbox.apache.org/repos/asf?p=activemq.git;h=487d4a1 ]

AMQ-7185 - track durable sub prepared acks in preCommit callback and release/remove on xa outcome, avoid duplicate delivery; fix and test


> XA durable sub prepared acks don't block redelivery
> ---------------------------------------------------
>
>                 Key: AMQ-7185
>                 URL: https://issues.apache.org/jira/browse/AMQ-7185
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, XA
>    Affects Versions: 5.15.0
>            Reporter: Gary Tully
>            Assignee: Gary Tully
>            Priority: Major
>             Fix For: 5.16.0
>
>
> If a durable sub acks a message in an XA transaction, on prepare the disk image is updated and on recovery the messages is pending an outcome and won't be redelivered.
> however if the durable sub disconnects and reconnects without a broker restart, it can receive the same messages again. Acked and prepared messages should be blocked pending the xa transaction outcome.
> This duplicate delivery can result in duplicate acks and early deletion of the message due to the reference count. The end result, another sub may see the message pending but not be able to receive it b/c it has already been removed from the store.
> symptom in other words:
> durableSub1 and durableStub2 registered, send one message to the topic. The message reference count is 2.
> durabelSub1 does receive in xa transaction, prepares and dies. The ack needs recovery and completion via the transaction manager.
> durableSub1 reconnects and gets the same message again! commits success. The message reference count is decremented to 1.
> the first xa transaction gets recovered and commits, the duplicate ack gets processed; the message reference count is 0 and the message gets deleted in error.
> durableSub2 tries to receive, message pending is 1, but it does not get any message!
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)