Skip to content
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

[pulsar-client] Fix bug that beforeConsume() of interceptor is not called when receiver queue size is 0 #5777

Merged
merged 1 commit into from Dec 2, 2019

Conversation

massakam
Copy link
Contributor

Motivation

I implemented ConsumerInterceptor and used it, but I noticed that the beforeConsume() method is not executed when the size of the receiver queue is 0.

Modifications

If the receiver queue size is 0, an instance of ZeroQueueConsumerImpl class is created instead of ConsumerImpl, but beforeConsume() is not called in this class now. So I fixed ZeroQueueConsumerImpl.

@massakam massakam added type/bug The PR fixed a bug or issue reported a bug area/client labels Nov 30, 2019
@massakam massakam added this to the 2.5.0 milestone Nov 30, 2019
@massakam massakam self-assigned this Nov 30, 2019
Copy link
Contributor

@codelipenghui codelipenghui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@codelipenghui codelipenghui merged commit 9b415ce into apache:master Dec 2, 2019
@massakam massakam deleted the before-consume branch December 2, 2019 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/client type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants