qpid-cpp icon indicating copy to clipboard operation
qpid-cpp copied to clipboard

QPID-8538: Replenish the credit after drain by the drained amount of messages

Open morapet opened this issue 3 years ago • 1 comments

There is a bug in the fetch code, which causes the drain to end by the call of the GET which top-up credit only by 1. If there is queued e.g 1-2 messages queued from broker and local client gave up whole credit by the drain cycle, it must be always replenished by the real amount of messages drained from broker, otherwise the fetch method is ended with credit 1 or 0. Then the performance is degraded to very small.

You can do whatever with this PR, consider this as free of charge contribution for open source community.

morapet avatar Jun 21 '21 08:06 morapet

Related JIRA https://issues.apache.org/jira/browse/QPID-8538.

gemmellr avatar Jun 21 '21 09:06 gemmellr