[doc][broker]PIP-187 Make FilterResult#RESCHEDULE to deprecated#17783
[doc][broker]PIP-187 Make FilterResult#RESCHEDULE to deprecated#17783poorbarcode wants to merge 1 commit intoapache:masterfrom
Conversation
|
This PR should merge into the following branches:
|
|
Hi @eolivelli could you take a look? Thanks |
eolivelli
left a comment
There was a problem hiding this comment.
I don't agree.
RESCHEDULE has its own purpose and it works.
https://github.com/datastax/pulsar-jms/blob/master/pulsar-jms-filters/src/main/java/com/datastax/oss/pulsar/jms/selectors/JMSFilter.java#L91
it is also useful when the filter has a temporary error, like here
For instance I am using in on the JMS Filter
https://github.com/datastax/pulsar-jms/blob/master/pulsar-jms-filters/src/main/java/com/datastax/oss/pulsar/jms/selectors/JMSFilter.java#L111
this is not a BETA API.
if you want to deprecate it then please propose something else that covers these needs.
It would be great to have a mechanism to "select" the Consumers and do not let the message arrive to the filter in case that the "Wrong consumer" was picked up.
in any case we need some "TEMPORARY_ERROR" outcome for the filter, to allow the filter to postpone the processing when it cannot fail or accept a message
|
Hi @eolivelli
make sense |
Motivation
FilterResult.RESCHEDULEis a beta API, may be risky in the following scenarios:Shared:consumer_1can consume 60% of the messages, andconsumer_2can consume 60% of the messages, so there is 10% intersection between consumer_1 and consumer_2. If returns FilterResult.RESCHEDULE for more than 10% of messages, then it's possible: some message that can only be consumed by consumer_1 keeps redelivered to consumer_2, and some message that can only be consumed by consumer_2 keeps redelivered to consumer_1. Then these messages can not be consumed anymore for a long time.Shared:consumer_1can consume 40% of the messages,consumer_2can consume 40% of the messages, and no consumer can consume the remaining 20%. If this 20% of the messages always returnFilterResult.RESCHEDULE, this will cause that part of the message to always be redelivered and never consumed.Key_Shared/Exclusive/Failover: This API cannot be used because there is no spare consumer to consume the redelivered message.Modifications
Suggestion solution
Make
FilterResult.RESCHEDULEtodeprecatedto avoid user use.Other solution
Provide two strategies for messages that cannot be consumed:
Why not choose this solution?
Because we can create a new subscription to achieve the same effect instead use
FilterResult.RESCHEDULE.Documentation
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)
Matching PR in forked repository
PR in forked repository: