Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-1892

transfers for multiplexed deliveries on the same session can have the wrong delivery-id

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      Given a session with two outgoing links the situation can occur that two deliveries on separate links share the same delivery-id. This situation occurs when a multi frame transfer is being sent on link A and a new (single frame) transfer is sent (multiplexed) on link B before the delivery on link A completes. The reason this occurs is because the increment of the delivery id counter (maintained per session) is delayed until the entire (multi frame) delivery is complete (here) allowing the second delivery to get the same delivery id when calling getOutgoingDeliveryId here

      My 100% reproduction scenario is as follows:

      • Run artemis (2.6.2 which uses proton-j 0.27.1) with an AMQP connector
      • Send a large message (10MB) to queue A
      • Send a couple of small messages to queue B
      • Connect a proton-c based client with a small maxFrameSize (8K) and limited credit to artemis and simultaneously subscribe to both queues (I think a flow frame triggers artemis to initiate a transfer therefore the limited credit).

      With proton-c trace logging enable you will get something like this:

      proton-trace.log

      The attached patch fixes the issue.

      proton-j-delivery-id-fix.patch

       

       

       

       

      Attachments

        1. proton-j-delivery-id-fix.patch
          2 kB
          Marcel Meulemans
        2. proton-trace.log
          1.0 kB
          Marcel Meulemans

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            robbie Robbie Gemmell
            mmeulemans Marcel Meulemans
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment