Google News
logo
Kafka - Interview Questions
How does Kafka work?
Kafka combines two messaging models, queuing and publish-subscribe, to provide the key benefits of each to consumers. Queuing allows for data processing to be distributed across many consumer instances, making it highly scalable. However, traditional queues aren’t multi-subscriber.

The publish-subscribe approach is multi-subscriber, but because every message goes to every subscriber it cannot be used to distribute work across multiple worker processes. Kafka uses a partitioned log model to stitch together these two solutions.

A log is an ordered sequence of records, and these logs are broken up into segments, or partitions, that correspond to different subscribers. This means that there can be multiple subscribers to the same topic and each is assigned a partition to allow for higher scalability.

Finally, Kafka’s model provides replayability, which allows multiple independent applications reading from data streams to work independently at their own rate.
 
Queuing :
Apache Kafka

Publish-Subscribe :
Apache Kafka
Advertisement