...
On client side, we add a new config called MEMBER_ID in ConsumerConfig. On consumer service init, if the MEMBER_ID config is set, we will put it in the initial join group request; otherwise, we will still send UNKNOWN_MEMBER_ID to ask broker for allocating a new random ID. To distinguish between previous version of protocol, we will also increase the join group request version to v3 when MEMBER_ID is set.
Code Block | ||||
---|---|---|---|---|
| ||||
public static final STRING MEMBER_ID; // default empty String
|
On server side, broker will keep handling join group request <= v2 as before. If the protocol version is upgraded to v3, the broker will no longer use the client id plus random generated member id suffix as the member id. Instead, server will use the member id specified in the join group request v3. The change will be applied in addMemberAndRebalance.
...