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

When consumer is paused check if it's paused #1793

Open
jjbskir opened this issue Aug 8, 2024 · 0 comments
Open

When consumer is paused check if it's paused #1793

jjbskir opened this issue Aug 8, 2024 · 0 comments

Comments

@jjbskir
Copy link

jjbskir commented Aug 8, 2024

Description

Feature request. When pausing a consumer, it would be nice if there was a way to check if the consumer is paused. For example a consumer could be paused / resumed based on various conditions and the user may want to know the current state of the consumer. Currently the only way to do this would be to store the state externally in another variable.

How to reproduce

from confluent_kafka import Consumer

c = Consumer({...})
c.subscribe(topics)
c.pause(topic_partitions)
# how to check if the consumer is paused? 

Ideally the consumer would have a method like .is_consumer_paused() or a property .paused

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

No branches or pull requests

2 participants