so what will be message flow in this scenario - when we have 4 partition and single consumer A, 4 message produces, 4 message consume by single consumer A, now another consumer B got connected with that broker, how rebalancing will happened, from where means from beginning or latest , B will consume the message
If Consumer A consumed all 4 messages from partitions 0, 1, 2, and 3, and then Consumer B joins: After the rebalance, Consumer A will continue consuming from its newly assigned partitions, and Consumer B will start consuming from the latest position (the offsets already committed by Consumer A) for its newly assigned partitions. The exact starting point for Consumer B is determined by: If Consumer B is in the same consumer group as Consumer A, it will start from the latest committed offset for the partitions assigned to it. If Consumer B is a completely new consumer group (not part of the same group as A), it will consume from the latest offset or from the earliest offset, depending on the consumer group’s configuration (this is controlled by the auto.offset.reset setting, which can be set to earliest or latest)
While having multiple producer instances can lead to potential duplicates if not managed properly, Kafka's idempotent producer feature and proper configuration can help mitigate this risk.
Nice video❤
Thank you 👍
Thanks
so what will be message flow in this scenario -
when we have 4 partition and single consumer A, 4 message produces, 4 message consume by single consumer A, now another consumer B got connected with that broker, how rebalancing will happened, from where means from beginning or latest , B will consume the message
If Consumer A consumed all 4 messages from partitions 0, 1, 2, and 3, and then Consumer B joins:
After the rebalance, Consumer A will continue consuming from its newly assigned partitions, and Consumer B will start consuming from the latest position (the offsets already committed by Consumer A) for its newly assigned partitions.
The exact starting point for Consumer B is determined by:
If Consumer B is in the same consumer group as Consumer A, it will start from the latest committed offset for the partitions assigned to it.
If Consumer B is a completely new consumer group (not part of the same group as A), it will consume from the latest offset or from the earliest offset, depending on the consumer group’s configuration (this is controlled by the auto.offset.reset setting, which can be set to earliest or latest)
@@technotowntechie9732 Thank u Sir :)
How it will work if we have multiple instances of same producer messages will be send duplicate right
While having multiple producer instances can lead to potential duplicates if not managed properly, Kafka's idempotent producer feature and proper configuration can help mitigate this risk.
hi do you have ppt please?
Udemy course about Kafka