confluentinc / confluentinc/confluent-kafka-python

When consumer is paused check if it's paused

Open
#1,793 2 comments 1 reaction 0 assignees View on GitHub
enhancement good first issue size:small status:help-wanted status:waiting-for-interest
Dominant language
Python
Stars
509
Forks
964
Avg merge
2d 2h
Merged PRs (30d)
14

Description

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`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.