Consumer Group
Pronunciationkun-SOO-mer GROOP
Definition
A consumer group is a set of consumers that share the work of reading a topic: each partition is read by only one member of the group, and different groups each receive all the messages.
Where you hear it
In Kafka, Kinesis and Redis Streams, and when scaling event processors.
Examples
The billing and analytics services use separate consumer groups.
More consumers than partitions leaves some idle.
The analytics group reads every order event, while the email group reads the same events on its own.
Common mistake
Giving two different services the same group id. They then split the messages instead of each getting all of them.
Don't confuse with
Competing consumers, the general pattern. A consumer group is how Kafka names and tracks it.
Say it at work
- In a meeting or chat
What's the group id for this service?
- In an email or ticket
Consumer lag is growing in the payments group.
Keep exploring
More in Architecture & Design