BewareMyPower opened a new pull request, #16061:
URL: https://github.com/apache/pulsar/pull/16061
### Motivation
This is the first part to support chunking with Shared subscription.
Instead of adopting the solutions from the original proposal, this PR
uses a more simple way:
1. Skip dispatching the incomplete chunks and add them to the replay.
2. If a consumer's permits cannot receive a whole chunked message, skip
this consumer.
### Modifications
Add an `EntryAndMetadataList` class to hold a list of entries and the
associated metadata instances, as well as the following methods:
- `sortChunks`: Sort the entries so that all chunks that belong to
the same message will be distributed consistently. All incomplete
chunks will be put at the end after the "watermark" index.
- `containIncompleteChunks`: Detect if the range `[start, end]` has
incomplete chunks.
Then, in the `PersistentDispatcherMultipleConsumers#sendMessages`,
leverage the `EntryAndMetadataList` class to implement the logic
described in the previous section.
Finally, cancel the limit in `ConsumerImpl` to process chunks for Shared
subscriptions.
### Verifying this change
`MessageChunkingTest#testChunkMessagesWithSharedSubscriptions` is added.
### Documentation
Check the box below or label this PR directly.
Need to update docs?
- [x] `doc-required`
(Your PR needs to update docs and you will update later)
- [ ] `doc-not-needed`
(Please explain why)
- [ ] `doc`
(Your PR contains doc changes)
- [ ] `doc-complete`
(Docs have been already added)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]