kafkian
kafkian copied to clipboard
How to stop consumer.
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
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.