Process Flow - Python consumer
Start Consumer
Connect to Kafka Broker
Subscribe to Topic
Poll for Messages
Message Received?
No→Wait and Poll Again
Yes
Process Message
Commit Offset
Repeat Polling Loop
Stop Consumer on Signal
The Python consumer connects to Kafka, subscribes to a topic, polls messages in a loop, processes each message, commits offsets, and repeats until stopped.