Skip to main content

Kafka Pull Model

Unlike RabbitMQ, Kafka lets only consumers pull messages from the brokers.

A Kafka consumer sends a fetch message. The broker replies with one or more messages.

For each fetch request, the broker returns one fetch response. It may flag that more messages are waiting. Then the consumer sends a new fetch request to get the rest.

Kafka Pull Model
Request supports multiple partitions

In one fetch request, the consumer can also ask for data from many partitions.

The broker then groups the messages from those partitions and returns them.