0

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?

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
user1474111
  • 1,356
  • 3
  • 23
  • 47

1 Answers1

1

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.

JohnsonCore
  • 544
  • 1
  • 4
  • 13
  • In which case do I need to know name of consumer or producer ?Is there a such a situation? As I understand they are interested in related message topics. – user1474111 Sep 23 '19 at 14:45
  • 1
    Logs, mainly, from my experience. But there might be some plugin modules or apis that can use that field. – JohnsonCore Sep 23 '19 at 15:00