rdhabalia opened a new pull request #7266: URL: https://github.com/apache/pulsar/pull/7266
### Motivation Right now, dispatching of batch messages is not predictable for a shared-subscription. Dispatcher doesn't consider number of batch messages in an entry which can cause higher number of message delivery than consumer receiver-queue. For example: If a topic has message-entries with 100 batched message in an entry. If consumer has receiver queue=40 and has available-permits=20. then broker dispatches 20 entries with total 2000 (20*100) messages in it. because of that consumer's will high number of messages than expected and we can see available-permits in negative. ### Modification - Find out average number of batch messages in an entry - Dispatch messages considering total batch-messages in an entry ### Result It will avoid dispatching higher number of messages than consumer's available-permit and will fix -ve available-permits. -- 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. For queries about this service, please contact Infrastructure at: [email protected]
