kafkian icon indicating copy to clipboard operation
kafkian copied to clipboard

How to stop consumer.

Open xs005 opened this issue 5 years ago • 1 comments

I know this is a silly question, but I don't know how to do that. I try to check if message is None, but the consumer just stops consuming if there is no update, and message is the last message.

Could you please tell me how to do that?

for message in consumer: if message is not None: consumer.commit() else: consumer._close() break

xs005 avatar Jul 18 '19 18:07 xs005

Hi @xs005 - did not really get what you want to achieve and what's the use-case. Messages should be not None in the normal, blocking scenario.

saabeilin avatar Sep 16 '19 00:09 saabeilin