user1870400
user1870400

Reputation: 6364

Can multiple Kafka consumers read from the same partition of same topic by default?

Can multiple Kafka consumers read from the same partition of same topic by default? By default, I mean since group.id is not mandatory I am wondering if I spawn multiple kafka consumers without specifying any group.id and give them the same topic and partition name will they be able to read from the same partition? I understand that If I give different group names for each Kafka consumer then all the consumers can read from the same partition.

Upvotes: 1

Views: 751

Answers (1)

Girdhar Sojitra
Girdhar Sojitra

Reputation: 678

Can multiple Kafka consumers read from the same partition of same topic by default?

Yes.

By default, I mean since group.id is not mandatory I am wondering if I spawn multiple kafka consumers without specifying any group.id and give them the same topic and partition name will they be able to read from the same partition?

Yes.

You can look at https://kafka.apache.org/documentation/#consumerconfigs for default values for consumer properties.

Upvotes: 1

Related Questions