You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "programmerahul (via GitHub)" <gi...@apache.org> on 2026/09/27 19:09:41 UTC
[I] [Bug] Return flow-control permit when client seek by messageID [pulsar]
programmerahul opened a new issue, #26727:
URL: https://github.com/apache/pulsar/issues/26727
### Search before reporting
- [x] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Read release policy
- [x] I understand that [unsupported versions](https://pulsar.apache.org/contribute/release-policy/#supported-versions) don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.
### User environment
broker and client version 4
### Issue Description
When a consumer seeks to (or is created with) a specific startMessageId, the broker re-dispatches the boundary message, which the client filters out in messageReceived() via the isSameEntry(msgId) && isPriorEntryIndex(...) block. That block released the payload and returned without calling increaseAvailablePermits(), so the dropped message's outstanding flow-control permit was never repaid (it is not delivered, so messageProcessed() never runs for it).
Each seek-to-messageId therefore leaks one permit. It is masked at normal receiver queue sizes (seek re-establishes flow control), but with receiverQueueSize=1 the single leaked permit exhausts the whole budget and the consumer stalls immediately after the seek -- the message after the seek target is never delivered. Not chunking-specific; applies to plain messages too.
### Error messages
```text
There is one permit leak when client uses seek by message id in their client code
```
### Reproducing the issue
Using consumer.seek(msgId) in consumer code. and set .receiverQueueSize(1). With that the consumer will freeze
### Additional information
_No response_
### Are you willing to submit a PR?
- [x] I'm willing to submit a PR!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] Return flow-control permit when client seek by messageID [pulsar]
Posted by "codelipenghui (via GitHub)" <gi...@apache.org>.
codelipenghui closed issue #26727: [Bug] Return flow-control permit when client seek by messageID
URL: https://github.com/apache/pulsar/issues/26727
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org