0
votes

With Spring Cloud Stream is there any way to set the Kafka client id property? Naturally I'm using the Kafka binder. Several of my services that would set this will be replicated, so is there any way to make the IDs unique between instances? (Looking at Spring Kafka Consumer Client-Id configuration it appears that the IDs need to be unique.)

Assuming I can set the property, is there anyway to query for the ID at runtime?

1

1 Answers

1
votes

You can set it via clientId property of KafkaProperties provided by spring-kafka project (which is used by spring-cloud-stream). That said, I am not sure I fully understand the "... replicated services..." remark. I mean I am not sure what do you mean by that in the scope of spring-cloud-stream project and what it may or may not support. Could you please clarify?