Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-5456

AMQP messages accepted transactionally by a consumer should retain the TransactionalState until commit/rollback

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.10.0
    • Fix Version/s: 5.11.0
    • Component/s: AMQP
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      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:

      <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>
      

        Attachments

          Activity

            People

            • Assignee:
              tabish Timothy A. Bish
              Reporter:
              robbie Robbie Gemmell
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: