question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

spring.kafka.bootstrap-servers overrides brokers configuration of every binder.

See original GitHub issue

Hi, I have to configure two separate kafka brokers (as on example below) and this is working just fine.

spring:
  cloud:
    stream:
      binders:
        kafka1:
          type: kafka
          environment:
            spring:
              cloud:
                stream:
                  kafka:
                    binder:
                      brokers: dev1-stage.dub:9092
        kafka2:
          type: kafka
          environment:
            spring:
              cloud:
                stream:
                  kafka:
                    binder:
                      brokers: dev2-stage.dub:9092
      bindings:
        firstOut:
          destination: first_topic
          binder: kafka1
        secondOut:
          destination: second_topic
          binder: kafka2

But also I need to configure zipkin+sleuth in application - and only way I can do for this for kafka sender type is via adding.

spring:
  kafka:
    bootstrap-servers: dev1-stage.dub:9092

As soon, as spring.kafka.bootstrap-servers added, it started to override kafka2.environment.spring.cloud.stream.kafka.binder.brokers - so application just trying to write to kafka on dev1-stage.dub, instead of dev2-stage.dub.

How can I prevent this overriding?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sobychackocommented, Oct 10, 2020

@DmitryRyzhikov Thanks for this very detailed analysis. This was a glitch. I issued a PR for addressing the problem.

0reactions
DmitryRyzhikovcommented, Oct 13, 2020

@sobychacko Could you please give me any insights (even approximately) on release date for this changes?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Overriding "(consumer|producer)Properties.bootstrap.servers ...
I'm basically using the following configuration: spring.cloud.stream.kafka.binder.brokers=${KAFKA_HOSTS} spring.cloud.stream.kafka.binder.
Read more >
Spring Cloud Stream Kafka Binder Reference Guide
A list of brokers to which the Kafka binder connects. ... To avoid repetition, Spring Cloud Stream supports setting values for all channels,...
Read more >
How to set a seperate bootstrap server to a DLT of a binding
When you enable DLT, the destination needs to be on the same Kafka cluster as the input topic. At the moment, the binder...
Read more >
Spring Boot Implementation For Apache Kafka With Kafka Tool
Kafka uses ZooKeeper, an open-source technology that maintains configuration information and provides group services.
Read more >
spring-cloud/spring-cloud-stream - Gitter
My setup works fine when I use only spring.cloud.stream.kafka.binder.brokers=${KAFKA_HOSTS} . It auto configures correctly the topic partitions I'm consuming ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found