Robbie Gemmell created ACTIVEMQ6-59:
---------------------------------------
Summary: AMQP messages published transactionally should be
accepted using a TransactionalState
Key: ACTIVEMQ6-59
URL: https://issues.apache.org/jira/browse/ACTIVEMQ6-59
Project: Apache ActiveMQ 6
Issue Type: Bug
Affects Versions: 6.0.0
Reporter: Robbie Gemmell
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.4#6332)