-
Notifications
You must be signed in to change notification settings - Fork 219
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
consumer_timeout_ms #897
Comments
I would use the "timeout_ms" parameter of the getmany method https://aiokafka.readthedocs.io/en/stable/api.html#aiokafka.AIOKafkaConsumer.getmany It is different from the iterator consumption of your example : instead of iterating over the consumer, you would have to loop around getmany until you get no messages back |
|
The same parameters(consumer_timeout_ms), why the effect is not the same |
I believe Vincent meant to use |
using timeout_ms parameter of getmany, can achieve my purpose, it works |
Despite the fact both parameters have the same name in aiokafka and python-kafka, it doesn't seem they have the same behavior python kafka
aiokafka
With a quick look, in aiokafka it is used in the fetcher in a way that matches what the documentation is saying. So the closer thing you could have in aiokafka is timeout_ms on getmany, but maybe the consumer parameter could be renamed to avoid a confusion with python-kafka (and eventually have a parameter that is used as default |
I have a topic named my_topic, I want to exit process that no data is put into the topic within ten seconds when consuming my_topic
using kafka-python package, I can make consumer_timeout_ms = 10000, it works, code show as below:
but using aiokafka package, I also make consumer_timeout_ms = 10000, It doesn't work, code show as below:
Which parameter should I assign to achieve my goal tthat exiting process that no data is put into the topic within ten seconds
The text was updated successfully, but these errors were encountered: