Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set consumer.id for new Kafka consumer

According to the docs, Old Consumer Configs included a consumer.id set to null by default:

consumer.id
Default: null
Description: Generated automatically if not set.

Is it possible to set the consumer.id for the New Kafka Consumer and if so, how can I achieve this?

like image 977
Giorgos Myrianthous Avatar asked Nov 17 '22 14:11

Giorgos Myrianthous


1 Answers

Kafka automatically generates a consumer.id which is used by itself to identify the active consumers in a consumer group and it is not possible to manually set the consumer.id for Kafka Consumers.

like image 186
Giorgos Myrianthous Avatar answered Dec 21 '22 15:12

Giorgos Myrianthous