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

fix: avoid partition revocation on paused consumers #391

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

lynnagara
Copy link
Member

it is valid for consumers to be paused for periods of time that exceed the max.poll.interval.ms.

we need to continue polling the consumer in this scenario so that the partitions do not get revoked.

librdkafka will not yield any new messages when polling a paused consumer

it is valid for consumers to be paused for periods of time that
exceed the max.poll.interval.ms.

we need to continue polling the consumer in this scenario so
that the partitions do not get revoked.

librdkafka will not yield any new messages when polling a paused consumer
@lynnagara lynnagara requested review from a team as code owners November 21, 2024 17:09
# A paused consumer should still poll periodically to avoid it's partitions
# getting revoked by the broker after reaching the max.poll.interval.ms
# Polling a paused consumer should never yield a message.
assert self.__consumer.poll(0.1) is None
Copy link
Member

Choose a reason for hiding this comment

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

do we not want to sleep in this elif block?

Copy link
Member Author

@lynnagara lynnagara Nov 21, 2024

Choose a reason for hiding this comment

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

it's already effectively got a sleep for 0.1 in there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants