Lovi
Lovi

Reputation: 45

spring-cloud-starter-bus-kafka setup on configserver

Dear Spring developers!

I would like to setup the spring cloud configserver from offical docs, and from sample codes. It works for me, and I would like to refresh my properties at runtime, if I change it github.

I already added the spring-cloud-config-monitor dependency as well, and I would like to use Kafka for change event broadcasting. I read it in docs, that it is possible, but I can't configure the configserver's spring-cloud-starter-bus-kafka and the clients's spring-cloud-starter-bus-kafka.

I also used a zookeeper, and kafka in docker, it works well.

Can anyone help me about how to configure kafka bus to configserver, and configclient?

Thanks

Upvotes: 3

Views: 2391

Answers (2)

Nikhil Kakade
Nikhil Kakade

Reputation: 111

spring:
  cloud:
    stream:
      kafka:
        binder:
          brokers: host1:port1,host2:port2
          zkNodes: host1:port1,host2:port2
          zkSessionTimeout: 6000

This worked for me. If you want to configure external Kafka brokers then the config should be by default convention of spring cloud kafka connector.

Upvotes: 1

Malike St
Malike St

Reputation: 16

spring:
  cloud:      
    bus:     
      enabled: true
    stream:
      kafka:
        binder:
          zkNodes: localhost:9092,127.0.0.1:9092
          brokers: localhost:2181,127.0.01:2181

Upvotes: 0

Related Questions