3
votes

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

2
The question is very broad. Can you edit to clarify what part you're stuck on? - jinglesthula

2 Answers

1
votes
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.

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