Uploaded image for project: 'Qpid Dispatch'
  1. Qpid Dispatch
  2. DISPATCH-1703

router drops TransactionalState on produced messages on link routes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.10.0, 1.11.0, 1.12.0
    • 1.13.0
    • None
    • None

    Description

      The router is dropping the TransactionalState carrying the txn-id on produced messages when link routing to e.g a broker (that the txn coordinator link has also been routed to).

      This makes the send non-transactional between router and broker, entirely breaking the transactional model and meaning the send takes effect before committed, making it available for consumption by consumers before commit, meaning it cant be rolled back, etc.

      Take for example the attached modified Qpid JMS HelloWorld example, link routing the producer and consumer to a broker, using the attached router config. During this, the router can be seen logging arrival of a produced message carrying TransactionalState with the relevant txn-id. It can then be seen immediately sending this message on to the broker as expected - but without the TransactionalState. These 2 lines should essentially be identical but for the transport/channel and direction arrow details:

      [0x10ff240]: AMQP:FRAME:1 <- @transfer(20) [handle=1, delivery-id=1, delivery-tag=b"\x00", message-format=0, settled=false, more=false, state=@transactional-state(52) [txn-id=b"15cecc4b-bac1-11ea-b3f8-000c29e9f622"]] (149) "\x00Sr\xc1)\x04\xa3\x0ex-opt-jms-destQ\x00\xa3\x12x-opt-jms-msg-typeQ\x05\x00Ss\xd0\x00\x00\x00L\x00\x00\x00\x0a\xa1/ID:6d720961-1a6b-446a-9606-55b594e74f39:1:1:1-1@\xa1\x05queue@@@@@@\x83\x00\x00\x01s\x04\xe3\xcc \x00Sw\xa1\x0eHello world! 1"
      [0x10b0d70]: AMQP:FRAME:0 -> @transfer(20) [handle=1, delivery-id=1, delivery-tag=b"\x00", message-format=0] (155) "\x00Sr\xd1\x00\x00\x00,\x00\x00\x00\x04\xa3\x0ex-opt-jms-destQ\x00\xa3\x12x-opt-jms-msg-typeQ\x05\x00Ss\xd0\x00\x00\x00L\x00\x00\x00\x0a\xa1/ID:6d720961-1a6b-446a-9606-55b594e74f39:1:1:1-1@\xa1\x05queue@@@@@@\x83\x00\x00\x01s\x04\xe3\xcc \x00Sw\xa1\x0eHello world! 1"
      

      The produced message arrives at the broker and is accepted and transferred back to the router and on to the consumer, before the clients original send was committed - which it never was since the example actually does a rollback after send and so should fail to consume anything.

      Attachments

        1. router_trace.txt
          22 kB
          Robbie Gemmell
        2. qdrouterd.conf
          1 kB
          Robbie Gemmell
        3. HelloWorld.java
          3 kB
          Robbie Gemmell
        4. client_trace.txt
          11 kB
          Robbie Gemmell
        5. broker_trace.txt
          11 kB
          Robbie Gemmell

        Issue Links

          Activity

            People

              kgiusti Ken Giusti
              robbie Robbie Gemmell
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: