They are totally different parameters, I've also had to re-read the docs in order to get this clear.
client.id
is an unique identifier of the consumer, which is mainly
used for tracking the source of the requests and log them.
group.instance.id
is an unique identifier of the consumer used to make the consumer static, and is not related to client.id.
That means you could have these two values in your consumer A
's configuration, for example:
//Consumer A
client.id = 123
group.instance.id = 1
The key here is within the static membership paradigm introduced in KIP-345.
The idea is to avoid the partition changes between consumer threads after a rebalance. For example, if you have three different consumers from the same group.id, and set them unique group.instance.ids, each of those consumers will be assigned the same partitions, always.
For example, consider three consumers inside the same group:
Consumer A
- group.instance.id = A
Consumer B
- group.instance.ud = B
Consumer C
- group.instance.ud = C
When reading from a Kafka topic with 9 partitions, they will ALWAYS hold the same partitions assigned, for example:
A (0,1,2) - B (3,4,5) - C (6,7,8)

WHat static membership avoids is the partition change caused by the default range assignor, which works by sorting the members in the group and
then assigning partition ranges to achieve balance.
This is well explained in this doc (do not confuse member.id with client.id)

- In red, Consumers without
group.instance.id
have to change
partitions with each rebalance due to the assignor.
- In green, consumers that did set an
instanceId(
group.instance.id
), becoming static consumers.
static membership makes each consumer "master" of it initial set of partitions. Even if a rebalance occurs, each consumer always
holds the same partitions, avoiding partition changes between
consumer threads.
TLDR;
In summary, those parameters are not related and the idea of setting a group.instance.id
is to make the consumer static
:
The idea is summarized as static membership, which in contrary to
dynamic membership (the one our system currently uses), is
prioritizing "state persistence" over "liveness".
The idea of this KIP is to reduce number of rebalances by introducing
a new concept called static membership