confluentinc / confluent-kafka-python

Confluent's Kafka Python Client
http://docs.confluent.io/current/clients/confluent-kafka-python
Other
3.73k stars 882 forks source link

?? What's the difference in consumer poll vs subscribe #1694

Closed will-e-yams closed 4 months ago

will-e-yams commented 6 months ago

Description

For consumer apps, I'm not seeing any relevant documentation on the behavior of subscribe and how that varies from poll. Any direction is appreciated and I apologize for using this forum (I was hoping there were "question" issue types).

FaridFArab commented 6 months ago

There are 2 kind of entities, subscribe used to set a position (offset) from which to read the events in the topic but pull method is responsible for fetching messages from the Kafka brokers and processing them by calling the user-defined message handler. I hope it can help you.

nhaq-confluent commented 4 months ago

@will-e-yams Did the above comment help?

If not here are some other resources that might help guide you: https://www.oreilly.com/library/view/kafka-the-definitive/9781491936153/ch04.html https://docs.confluent.io/platform/current/clients/confluent-kafka-python/html/index.html#consumer

I will mark this issue as closed. If you have further questions, please feel free to raise another issue or discussion.