I
I
impressive172021-03-14 21:06:07
Apache HTTP Server
impressive17, 2021-03-14 21:06:07

Can two consumers read from the same topic in Kafka?

Can two consumers read from the same topic? In this case, it is necessary that both of them process each message of the topic. To do this, do they need to set the same or different consumer_group_id?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
KoreanGuy, 2021-03-14
@impressive17

They must be in different groups because a consumer group is a single logical consumer that consists of one or more physical consumers. All partitions of all topics to which the group is subscribed are divided equally among the members of the group. Therefore, if you need not to divide, but to duplicate, you need several groups.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question