-
Notifications
You must be signed in to change notification settings - Fork 630
Open
Description
I use this version of the package: org.springframework.cloud:spring-cloud-stream-binder-kafka:4.3.1, when using the Kafka Binder to consume messages from two different Kafka Cluster the app start fails.
I have a similar application.yml file like the following:
spring:
application:
name: xxx
cloud:
stream:
default-binder: outbox
binders:
outbox:
type: kafka
environment:
spring:
kafka:
bootstrap-servers: broker-0:9092,broker-1:9092,broker-2:9092
consumer:
ack.mode: MANUAL
allow.auto.create.topics: false
eventbus:
type: kafka
environment:
spring:
kafka:
bootstrap-servers:eventbus-broker-0:9092,eventbus-broker-1:9092,eventbus-broker-2:9092
default:
consumer:
ack-mode: MANUAL
Localhost is used every time when the connection is established, and the bootstrap-servers configuration does not seem to take effect. It seems that the KafkaBinderConfigurationProperties.mergedProducerConfiguration method overwrites the ProducerConfig.BOOTSTRAP_SERVERS_CONFIG configuration with the kafkaConnectionDetails configuration every time. Since I did not define spring.kafka properties, the default value localhost was used during the KafkaProperties class initialization.

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels