You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After reviewing the related Ruby PR and comparing it to the similar Python and Java implementations, I think the Java implementation is missing a corner case.
Suppose the publisher flow controller's byteLimit is set to 1000 bytes, and the desired behavior to Block. If a message larger than that arrives (say, 1200 bytes), it would block forever, because it would just reserve the maximum available capacity, but that would still not be enough to let it through. It would also cause all other messages to get stuck behind.
From what I can see, there's no check if a message would actually need to reserve more than byteLimit to get through?
After reviewing the related Ruby PR and comparing it to the similar Python and Java implementations, I think the Java implementation is missing a corner case.
Suppose the publisher flow controller's
byteLimitis set to 1000 bytes, and the desired behavior toBlock. If a message larger than that arrives (say, 1200 bytes), it would block forever, because it would just reserve the maximum available capacity, but that would still not be enough to let it through. It would also cause all other messages to get stuck behind.From what I can see, there's no check if a message would actually need to reserve more than
byteLimitto get through?