Consumer
Consumers read a range of messages from a broker. Each consumer has an assigned group ID. All the consumers with the same group ID act as a single logical consumer. Each message of a topic is delivered to one consumer from a consumer group (with the same group ID). Different consumer groups for a particular topic can process messages at their own pace as messages are not removed from the topics as soon as they are consumed. In fact, it is the responsibility of the consumers to keep track of how many messages they have consumed.
As mentioned earlier, each message in a partition has a unique sequence number associated with it called an offset. It is through this offset that consumers know how much of the stream they have already processed. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access