I understand that multiple instances of a producer application can be started to produce data to a topic. What configuration changes are required for this? Do i need different client_id? Without any changes , it works. So not sure if there are any benefit of changing client id or any other config param? Thanks,
Asked
Active
Viewed 1,085 times
1 Answers
3
The client id is simply used for logging on the server.
The purpose of this is to be able to track the source of requests beyond just ip/port by allowing a logical application name to be included in server-side request logging.
So it's not very important unless you have many producers in the same application.
To get a different client id for each producer, you would need a producer factory for each.
On the consumer side, you can specify a client id at the container (or @KafkaListener
) level.

Gary Russell
- 166,535
- 14
- 146
- 179