[
https://issues.apache.org/jira/browse/AMQ-5456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robbie Gemmell updated AMQ-5456:
--------------------------------
Attachment: 0001-AMQ-5456-use-a-TransactionalState-acceptance-when-se.patch
Attaching patch which updates the broker to use a local TransactionalState
acceptance before settling messages being consumed in a transaction. This
causes the disposition reply state to match the clients earlier update.
{noformat}
<TCP time="10:54:07.144849" seqno="477148551" size="38">
<source host="127.0.0.1" port="34451"/>
<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:54:07.147447" seqno="2677401021" size="38">
<source host="127.0.0.1" port="5672"/>
<target host="127.0.0.1" port="34451"/>
<frame size="38" doff="2" chan="1">
<small-descriptor code="0x0:0x15"/> # disposition
<list8 size="25" count="5"> # disposition
<false/> # role
<uint0/> # first
<uint0/> # last
<true/> # 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>
{noformat}
> 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
>
> Attachments:
> 0001-AMQ-5456-use-a-TransactionalState-acceptance-when-se.patch
>
>
> 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)