Shankar
Shankar

Reputation: 8967

Mapping of Kafka partition to Kafka Consumer / Consumer groups

I'm reading the Kafka FAQ, where they are specifying as below.

•Each partition is not consumed by more than one consumer thread/process in each consumer group. This allows to have each process consume in a single threaded fashion to guarantee ordering to the consumer within the partition (if we split up a partition of ordered messages and handed them out to multiple consumers even though the messages were stored in order they would be processed out of order at times).

Is it possible that, One Partition can be consumed by Multiple Consumers in different consumer groups?

If yes, how it is managing the duplicate message read?

Update:

Actually I wanted to ask , I have one partition with 10 messages, and if I have 2 different consumer groups[group1, group2], is it possible consumer group1 reads first 5 messages and Consumer group2 reads another 5 messages?

Upvotes: 1

Views: 920

Answers (1)

serejja
serejja

Reputation: 23861

It's not possible (at least not designed to). The goal of having different consumer groups is exactly to be able to process same messages for a different purpose.

Upvotes: 3

Related Questions