Robbie Gemmell created AMQ-5456:
-----------------------------------
Summary: AMQP messages accepted transactionally by a consumer
should retain the TransactionalState until commit/rollback
Key: AMQ-5456
URL: https://issues.apache.org/jira/browse/AMQ-5456
Project: ActiveMQ
Issue Type: Bug
Components: AMQP
Affects Versions: 5.10.0
Reporter: Robbie Gemmell
Fix For: 5.11.0
When the broker receives a disposition frame accepting a message using
TransactionalState to make it part of a transaction, it sets the local message
state to Accepted and settles the delivery. If the incoming disposition was not
settled, this process causes a settled disposition frame to be sent to the
client which contains a non-transactional Accepted outcome. The message has not
yet actually reached this state (only doing so if the transaction is committed
successfully) and so should still have a TransactionalState linking it to the
transaction.
This issue can be seen in the protocol trace below:
{noformat}
<TCP time="10:05:17.783758" seqno="732965115" size="38">
<source host="127.0.0.1" port="57536"/>
<target host="127.0.0.1" port="5672"/>
<frame size="38" doff="2" chan="1">
<small-descriptor code="0x0:0x15"/> # disposition
<list8 size="25" count="5"> # disposition
<true/> # role
<uint0/> # first
<uint0/> # last
<false/> # settled
<small-descriptor code="0x0:0x34"/> # state <<<<<< transactional state
<list8 size="15" count="2"> # state
<bin8 size="8"> # txn-id
00 00 00 00 00 00 00 01
</bin8>
<small-descriptor code="0x0:0x24"/> # outcome
<list0/> # accepted
</list8>
# <null/> batchable [false]
</list8>
</frame>
</TCP>
<TCP time="10:05:17.785657" seqno="1813532080" size="22">
<source host="127.0.0.1" port="5672"/>
<target host="127.0.0.1" port="57536"/>
<frame size="22" doff="2" chan="1">
<small-descriptor code="0x0:0x15"/> # disposition
<list8 size="9" count="5"> # disposition
<false/> # role
<uint0/> # first
<uint0/> # 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)