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

[protonj2] Transfer ID does not wrap as expected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • protonj2-1.0.0-M19
    • protonj2-1.0.0-M20
    • protonj2
    • None

    Description

      When ProtonJ 2 creates a session and the peer replies with a large next-outgoing-id in the begin response (e.g. 4294967292), a receiver on the session throws an exception later on when it detects the next-incoming-id is greater than the limit of a uint32.

      Corresponding code:
      https://github.com/apache/qpid-protonj2/blob/d5144af7818b2695747782bacc410580d3ec7943/protonj2/src/main/java/org/apache/qpid/protonj2/types/transport/Flow.java#L153-L155
      https://github.com/apache/qpid-protonj2/blob/d5144af7818b2695747782bacc410580d3ec7943/protonj2/src/main/java/org/apache/qpid/protonj2/engine/impl/ProtonSessionIncomingWindow.java#L138

      The transfer-id is a sequence-no, so it must follow RFC-1982 and so wrap around (sections 2.8.9 and 2.8.10 of the AMQP 1.0 spec).

      So from my understanding, the nextIncomingId field should be set to 0 when it "overflows" and no exception should be thrown.

      Other fields like delivery-count may have the same problem.

      Attachments

        Activity

          People

            tabish Timothy A. Bish
            acogoluegnes Arnaud Cogoluègnes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: