-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature / Interceptor for negative ack redelivery #3962
Feature / Interceptor for negative ack redelivery #3962
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for picking this up. I really didn't think about interceptors when adding the negative acks stuff!
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerInterceptors.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Over all LGTM except the method name.
c184be5
to
7a8a532
Compare
run integration tests |
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerInterceptors.java
Outdated
Show resolved
Hide resolved
*Motivation* In some scenarios is it helpful to be able to set interceptor for redeliveries being happening due to negative acknowledge. *Modifications* - Add onNegativeAcksSend() method in ConsumerInterceptor interface. - Add handler for onNegativeAcksSend() interceptor in ConsumerBase. - Favor forEach on ConsumerInterceptor instead of classic for loop by index. - Optimization for each by index to avoid compute size() every iteration. - Add call method to onNegativeAckRedelivery() from NegativeAcksTracker.
7a8a532
to
e140df9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
run java8 tests |
1 similar comment
run java8 tests |
### Motivation This PR is the C++ implementation of apache/pulsar#3962 ### Modifications * Add `onNegativeAcksSend` to the consumer interceptor
Motivation
In some scenarios is it helpful to be able to set interceptor for redeliveries
being happening due to negative acknowledge.
Modifications
Verifying this change