[improve][pip] PIP-423: Add Support for Cancelling Individual Delayed Messages#8
[improve][pip] PIP-423: Add Support for Cancelling Individual Delayed Messages#8Denovo1998 wants to merge 10 commits into
Conversation
…f delayed messages.
…y MessageId and batch index support
There was a problem hiding this comment.
Pull Request Overview
This PR introduces PIP-423, a proposal for adding a new admin API to acknowledge/skip individual messages in Pulsar subscriptions by their specific MessageId.
- Introduces a new REST API endpoint and CLI command to skip specific messages by their MessageId (ledgerId:entryId:batchIndex)
- Leverages existing individual acknowledgement mechanisms for reliability
- Supports both full entry and partial batch message acknowledgements
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # the metadata store such as ZooKeeper. | ||
| managedCursorInfoCompressionType=NONE | ||
|
|
||
| # ManagedCursorInfo compression size threshold (bytes), only compress metadata when origin size more then this value. |
There was a problem hiding this comment.
Grammatical error: "more then" should be "more than".
| # in the metadata store such as ZooKeeper. | ||
| managedLedgerInfoCompressionType=NONE | ||
|
|
||
| # ManagedLedgerInfo compression size threshold (bytes), only compress metadata when origin size more then this value. |
There was a problem hiding this comment.
Grammatical error: "more then" should be "more than".
| This operation is local to a subscription's cursor within a single cluster. It has no direct impact on geo-replication. To skip a message on a replicated topic in multiple clusters, the admin command must be executed against each cluster individually. | ||
|
|
||
| # Alternatives | ||
|
|
There was a problem hiding this comment.
[nitpick] The "Alternatives" section is empty. While this may be intentional, it's typically good practice to include at least a brief discussion of alternative approaches that were considered and why they were rejected, or explicitly state that no alternatives were considered.
| The main alternative considered was to extend the existing `skip(numMessages)` API to allow skipping by `MessageId`. However, this approach was rejected because it would complicate the semantics of the existing API and could introduce ambiguity when skipping messages in batches or with delayed delivery. No other alternatives were identified that would provide the same level of precision and operational safety as the proposed admin API. |
…and Subscription interface extension
Motivation
In modern event-driven architectures, the ability to react to changing conditions is crucial. While Pulsar's delayed message feature is valuable for scheduling future tasks or deliveries, the lack of a cancellation mechanism presents a limitation. Use cases where cancellation is important include:
Without a cancellation feature, applications might resort to workarounds, such as:
This proposal aims to introduce a robust mechanism to cancel delayed messages directly at the subscription level, preventing their delivery if they are no longer needed.
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: apache#24370