- Spring Cloud Config Repo A < /li>
Сервер конфигурации со следующими зависимостями Maven: < /li >
< /ol>Свойства сервера конфигурации:Код: Выделить всё
org.springframework.cloud spring-cloud-config-server org.springframework.cloud spring-cloud-config-monitor org.springframework.cloud spring-cloud-starter-bus-kafka) Сам:Код: Выделить всё
spring.cloud.bus.enabled=true spring.kafka.bootstrap-servers=your-kafka-brokers spring.cloud.bus.id=config-server spring.cloud.bus.destination=config-topic < /code> В приложении (my-service
Код: Выделить всё
org.springframework.cloud
spring-cloud-starter-stream-kafka
< /code>
и его свойства приложения: < /p>
spring.config.import= //url of config server
spring.cloud.config.enabled=true
spring.cloud.stream.default.group={spring.application.name}
spring.cloud.bus.enabled=true
spring.cloud.bus.refresh.enabled=true
spring.cloud.bus.env.enabled=true
spring.cloud.bus.destination=cloud-config.topic
spring.kafka.bootstrap-servers= //kafka server urls
spring.cloud.stream.kafka.binder.brokers= //kafka urls
Код: Выделить всё
{
"type": "RefreshRemoteApplicationEvent",
"originService": "config-server",
"destinationService": "my-service:**",
"id": "e9b355bf-e28b-4e31-8a85-0b0434d643b6"
}
Код: Выделить всё
{
"type": "AckRemoteApplicationEvent",
"originService": "my-service:{instance-id}",
"destinationService": "**",
"ackId": "e9b355bf-e28b-4e31-8a85-0b0434d643b6",
"ackDestinationService": "my-service:**",
"event": "org.springframework.cloud.bus.event.RefreshRemoteApplicationEvent"
}
Вопрос:
Есть ли способ настроить Spring Cloud Bus Kafka так, чтобы все экземпляры приложения получали RefreshRemoteApplicationEvent, не требуя уникальных групп потребителей для каждого экземпляра? Или есть альтернативный подход к достижению такого поведения?
Любые советы и предложения будем очень признательны!
Подробнее здесь: https://stackoverflow.com/questions/793 ... unique-con
Мобильная версия