user1474111
user1474111

Reputation: 1516

What is the usage of id property of @KafkaClient

I am new in Kafka and microservices. I tried to understand the usage of id property of @KafkaClient but most of the examples are given without that property therefore could not understand clearly.

@KafkaClient(id = "client_id")

What is the usage of id property in that case? What does it mean?

Upvotes: 0

Views: 126

Answers (1)

JohnsonCore
JohnsonCore

Reputation: 581

If it's not provided, a default name is generated, which is why the examples don't show it. It's just an identifier of that consumer instance. So if you wanted to have a consumer named "Delayed-Consumer#1" you could use that, instead of a default that might be Consumer#1.

Upvotes: 1

Related Questions