1.

In a consumer group, what is the process of assigning a partition to a particular consumer?

Answer»

The first step for any consumer to join any consumer group is RAISING a request to the group coordinator. There is a group LEADER in a consumer group which is usually the first member of the group. The group leader gets the list of all members from co-ordinator. It keeps track of all the consumers which have recently contributed in the group are considered alive while other members are off tracked from the system. It is the responsibility of the group leader to ASSIGN partitions to individual consumers. It implements PartitionAssignor to assign partitions. 

There is an in-built partition policy to assign a partition to consumers. Once the partition is done, group leader sends that information to group co-ordinator which in turn inform respective consumers about their assignments. Individual consumers have only knowledge of respective assignments while group leader keeps track of all assignments. This whole process is called partition rebalancing. This happens whenever any NEW consumer joins the groups or exits the group. This step is very critical to PERFORMANCE and high throughput of messages.



Discussion

No Comment Found