Issue
I have a topic (let's call it "my-custom-topic") with 6 partitions and (actually) two consumers in it with the same group. The group is for a service, let's call it "myService". Time to time one of the services receives a REST request and then it will send an event to the "my-custom-topic". In this case I would like to let both services to receive the event. (yes, the one which sent it should also receive it). Later on if I will start other instances from "myService" I would also let them automatically receive this event. So, shortly, I would like to let all my services in the same group to receive all the messages there. (once / message)
How can I achieve this with Kafka?
Thank you for helping me.
Solution
Only one consumer in consumer group will actually get the message. To achieve this kind of broadcast, you need to assign each consumer to each own consumer group. You can get more details here How Kafka broadcast to many Consumer Groups
Answered By - Ivan
Answer Checked By - Senaida (JavaFixing Volunteer)