spring-cloud-stream icon indicating copy to clipboard operation
spring-cloud-stream copied to clipboard

Make brokers configuration consistent

Open reket opened this issue 1 month ago • 2 comments

I have two service, one is using spring-cloud-starter-stream-kafka and another spring-cloud-stream-binder-kafka-streams. Was faced with inconsistent brokers configuration (yaml):

This work for both

spring.cloud.stream.kafka.binder.brokers: host1:9092, host2:9092

But this one is working only with spring-cloud-starter-stream-kafka and silently fails on with spring-cloud-stream-binder-kafka-streams

spring.cloud.stream.kafka.binder.brokers: 
  - host1:9092
  - host2:9092

Proposal is to add support of second option to spring-cloud-stream-binder-kafka-streams.

Some pros:

  • Unification and consistency
  • Easier to switch libs without breaking changes
  • Improve readability
  • Simplify add/remove server to/from list (less chance make mistake when you have a bunch of instances)
  • Easier create reusable/shared configurations

reket avatar Oct 14 '26 13:10 reket

Hi @reket — thanks for reporting this. Are you already planning to work on a fix? If not, I’d be happy to reproduce the YAML-list behavior on current main and prepare a focused regression test and PR.

Could a maintainer also confirm whether the Kafka Streams binder should accept the same list-form spring.cloud.stream.kafka.binder.brokers configuration as the regular Kafka binder? I’ll wait for that direction before implementing a change.

sudhanshubliz avatar Oct 19 '26 04:10 sudhanshubliz

Hi @sudhanshubliz , I'm not able to work on this, just reported and will be happy to see it implemented.

reket avatar Oct 19 '26 13:10 reket