You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Arnaud Cogoluègnes (Jira)" <ji...@apache.org> on 2024/02/22 11:21:00 UTC

[jira] [Created] (PROTON-2794) Transfer ID does not wrap as expected

Arnaud Cogoluègnes created PROTON-2794:
------------------------------------------

             Summary: Transfer ID does not wrap as expected
                 Key: PROTON-2794
                 URL: https://issues.apache.org/jira/browse/PROTON-2794
             Project: Qpid Proton
          Issue Type: Bug
          Components: protonj2
    Affects Versions: protonj2-1.0.0-M19
            Reporter: Arnaud Cogoluègnes
            Assignee: Timothy A. Bish


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|https://www.ietf.org/rfc/rfc1982.txt] 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org