Search code examples
springconfigserver

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


Solution

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