Reputation: 492
I am new to kafka and have some basic doubts. I was trying to do a multinode kafka set up (Active-Active). here is the scenario :-
Now my doubts are, when I am sending a message from producer it is consumed by all three consumer,
q1. does that mean it is duplicating the message ?
q2. as producer is running on 9092,9093 then why consumer on port 9094 is consuming the message ? is it because it is using same topic name ?
q3. how I can make sure when i am sending a message from producer it should be consumed by a single consumer ? (I tried grouping but if any consumer is in different group it is receiving the message.)
q4. if I want to distribute the messages between consumers, how I can achieve this ?
q5. any other way to set up a multi node kafka (Active-Active) with single producer and multiple consumers ?
any help is appreciated.
Upvotes: 0
Views: 1267
Reputation: 2313
I've answered in comments, but this is really a question coming down to a lack of understanding about consumer groups in Kafka. This is too long to discuss in this format, so I'll direct you here https://kafka.apache.org/documentation/#theconsumer
Upvotes: 0