Daniil Kirilyuk created PROTON-2956:
---------------------------------------

             Summary: [protonj2] Pooled delivery-tag generator emits duplicate 
tags when more than 256 tags are checked out
                 Key: PROTON-2956
                 URL: https://issues.apache.org/jira/browse/PROTON-2956
             Project: Qpid Proton
          Issue Type: Bug
          Components: protonj2
    Affects Versions: protonj2-2.0.0
            Reporter: Daniil Kirilyuk
            Assignee: Timothy A. Bish


{{ProtonPooledTagGenerator}} has a default pool size of 512, but truncates each 
pooled tag ID to a Java {{byte}} when constructing the tag:
{code:java}
new ProtonPooledDeliveryTag((byte) nextTagId++).checkOut();{code}
This produces only 256 distinct AMQP delivery-tag byte values.

When sending pressure causes more than 256 pooled tags to be checked out 
concurrently, ProtonJ2 can therefore send a new delivery using the same tag as 
an existing unsettled delivery.

AMQP 1.0 requires a delivery tag to be unique among all deliveries that either 
end of the link could consider unsettled. A conforming peer can consequently 
detach the link with {_}Delivery-tag 'X' is used by another unsettled 
delivery{_}.

This seems to be the root cause of QPID-8599.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to