kafka-go icon indicating copy to clipboard operation
kafka-go copied to clipboard

Consumer Name / Client ID - Not Updating after Initial Create

Open steve-gray opened this issue 5 years ago • 2 comments

Describe the solution you'd like When using consumer groups, it appears that the consumer name is not set dynamically. Specifically:

  • If kafka-go is taking over a consumer group that was previously a sarama consumer group, it won't update the client ID
  • If kafka-go is creating a new consumer group, it'll set the DefaultClientID but never update it.

The trouble is that in a complex environment, as consumer groups get rebalanced, you generally don't want this - you want to know which server is holding the partition that stalled processing, so you can restart or investigate. To that end, the feature request is:

  • Minimally - Make the client ID get set on each rebalance using the ID's of the participating clients (at the time the groups rebalance).
  • Ideally - Allow consumer group to specify a client ID string to set in the arguments to the make the new reader, so we can produce our own values for this, falling back to the default if not specified.

In other consumers, the ID associated with each partition in a group would update each time the consumers rebalanced.

steve-gray avatar May 02 '20 07:05 steve-gray

Hello @steve-gray, thanks for opening the issue.

It seems that you have a good understanding of the issue, would you be available to submit a fix?

achille-roussel avatar Sep 29 '20 09:09 achille-roussel

We should still implement a fix for this issue.

achille-roussel avatar Oct 29 '21 16:10 achille-roussel