Q&A
Ask and answer questions to make information more available to wider audiences.
Amanda Norman @normanamanda2   11, Jul 2023 12:00 AM
working principle of Kafka
What is the working principle of Kafka?
answers 1
 
Answer 1
Vanessa Lucas @lucasvanessa8   13, Jul 2023 05:22 PM
The working principle of Kafka follows the below order.

Producers send message to a topic at regular intervals.
Broker in kafka responsible to  stores the messages which is available in  partitions configured for that topic. 
Kafka ensure that if producer publish the two messages, than both the message should be accept by consumer.
Consumer pull the message from the allocated topic.
Once consumer digest the topic than Kafka push the offset value to the zookeeper.
Consumer continuously sending the signal to Kafka approx every 100ms, waiting for the messages. 
Consumer send the acknowledgement ,when message get received.
When Kafka receives an acknowledgement, it modified the offset value to the new value and send to the  Zookeeper. Zookeeper maintain this offset value so that consumer can read next message correctly even during server outrages.
This flow is continuing repeating until the request will be live.