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 GitHub Bot (JIRA)" <ji...@apache.org> on 2017/03/20 16:42:41 UTC

[jira] [Commented] (ARTEMIS-59) AMQP messages published transactionally should be accepted using a TransactionalState

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

ASF GitHub Bot commented on ARTEMIS-59:
---------------------------------------

GitHub user tabish121 opened a pull request:

    https://github.com/apache/activemq-artemis/pull/1107

    ARTEMIS-59 Accept transacted message using AMQP TransactionState

    When a message is sent to the broker with a TransactionState indicating
    that he message should be included in a transaction the disposition from
    the broker indicating acceptance of the message should be done using a
    TransactionState value that contained the TX ID and the Accepted
    disposition.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tabish121/activemq-artemis ARTEMIS-59

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/1107.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1107
    
----

----


> AMQP messages published transactionally should be accepted using a TransactionalState
> -------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-59
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-59
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: AMQP
>    Affects Versions: 1.0.0
>            Reporter: Robbie Gemmell
>             Fix For: 2.next
>
>
> Currently, when an incoming AMQP message is part of a transaction, it is accepted using the regular Accepted terminal state on the disposition reply. According to the spec [1] the disposition should actually use a TransactionalState with Accepted outcome.
> Similar issue to AMQ-5352 for ActiveMQ 5.
> [1] http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transactions-v1.0-os.html#doc-idp111808
> The issue can be seen in the following protocol traces.
> The transactional message transfer from the producer:
> {noformat}
> <TCP time="17:24:01.619571" seqno="3858228929" size="194">
>   <source host="127.0.0.1" port="53895"/>
>   <target host="127.0.0.1" port="5455"/>
>   
>   <frame size="194" doff="2" chan="1"> 
>     
>     <small-descriptor code="0x0:0x14"/> # transfer
>     <list8 size="28" count="8"> # transfer
>       <small-uint> 1 </small-uint> # handle
>       <small-uint> 1 </small-uint> # delivery-id
>       <bin8 size="1"> # delivery-tag
>         "0"
>       </bin8>
>       <uint0/> # message-format
>       <null/> # settled
>       <false/> # more
>       <null/> # rcv-settle-mode
>       <small-descriptor code="0x0:0x34"/> # state             <<<< Transactional state
>       <list8 size="11" count="1"> # state
>         <bin8 size="8"> # txn-id
>           00 00 00 00 7f ff ff ff 
>         </bin8>
>         # <null/> outcome
>       </list8>
>       # <null/> resume [false]
>       # <null/> aborted [false]
>       # <null/> batchable [false]
>     </list8>
>     
>     <small-descriptor code="0x0:0x70"/> # header
>     <list8 size="2" count="1"> # header
>       <false/> # durable
>       # <null/> priority
>       # <null/> ttl
>       # <null/> first-acquirer
>       # <null/> delivery-count
>     </list8>
>     
>     <small-descriptor code="0x0:0x72"/> # message-annotations
>     <map8 size="40" count="4"> # message-annotations
>       <sym8 size="18">
>         "x-opt-jms-msg-type"
>       </sym8>
>       <byte> 5 </byte>
>       <sym8 size="13">
>         "x-opt-to-type"
>       </sym8>
>       <byte> 0 </byte>
>     </map8>
>     
>     <small-descriptor code="0x0:0x73"/> # properties
>     <list8 size="79" count="10"> # properties
>       <str8-utf8 size="51"> # message-id
>         "localhost.localdomai"
>         "n-48953-141840504087"
>         "8-0:1:1:1-1"
>       </str8-utf8>
>       <null/> # user-id
>       <str8-utf8 size="7"> # to
>         "myQueue"
>       </str8-utf8>
>       <null/> # subject
>       <null/> # reply-to
>       <null/> # correlation-id
>       <null/> # content-type
>       <null/> # content-encoding
>       <null/> # absolute-expiry-time
>       <time t="1418405041614"/>#2014/12/12 17:24:01.614 # creation-time
>       # <null/> group-id
>       # <null/> group-sequence
>       # <null/> reply-to-group-id
>     </list8>
>     
>     <small-descriptor code="0x0:0x77"/> # amqp-value
>     <str8-utf8 size="12"> # amqp-value
>       "Hello world!"
>     </str8-utf8>
>     
>   </frame>
>   
> </TCP>
> {noformat}
> The disposition for this message can then be seen being updated by the broker the Accepted state, rather than a TransactionalState identifying the transaction and containing the Accepted outcome:
> {noformat}
> <TCP time="17:24:01.630503" seqno="3477470126" size="24">
>   <source host="127.0.0.1" port="5455"/>
>   <target host="127.0.0.1" port="53895"/>
>   
>   <frame size="24" doff="2" chan="1"> 
>     
>     <small-descriptor code="0x0:0x15"/> # disposition
>     <list8 size="11" count="5"> # disposition
>       <true/> # role
>       <small-uint> 1 </small-uint> # first
>       <small-uint> 1 </small-uint> # last
>       <true/> # settled
>       <small-descriptor code="0x0:0x24"/> # state               <<<< Non-Transactional state
>       <list0/> # accepted
>       # <null/> batchable [false]
>     </list8>
>     
>   </frame>
>   
> </TCP>
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)