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 :-
- running single zookeeper (port: 2181)
- started three kafka brokers (9092,9093,9094)
- create a single topic test (partition: 1, replication 3)
- started producer using broker list (9092,9093)
- started consumer on 9092,9093,9094, but all of them are using same topic.
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.