I have the following configuration with custom kafka binder configurations
spring.cloud.stream:
bindings:
inputBinding1:
binder: kafka1
destination: destination1
inputBinding2:
binder: kafka2
destination: destination2
binders:
kafka1:
type: kafka
environment.spring.cloud.stream.kafka.binder:
brokers: hostname1
kafka2:
type: kafka
environment.spring.cloud.stream.kafka.binder:
brokers: hostname2
I want to represent spring.cloud.stream.binders.kafka1 and spring.cloud.stream.binders.kafka2 in Java as Spring Beans in a shareable library. The goal being to provide boilerplate Kafka cluster configuration such as brokers and consumer/producer properties. I'd like the ability to use either binder individually or multi binder