1.spring cloud bus 
spring cloud bus整合java的事件处理机制和消息中间件的发送和接收,主要是由发送端、接收端和事件组成。

目前spring cloud bus只实现了RabbitMq和Kafka的封装。

2、spring cloud bus与spring cloud config的整合,并以RabbitMq作为消息代理,实现了

应用配置的动态更新。

spring cloud bus 消息总线 原理总结

向service A的实例3发送post请求,访问/bus/refresh接口,此时,service A的实例3就会将刷新请求发送到消息总线上,该消息事件会被service A的实例1和实例2从总线中获取到,并重新从config server中获取它们的配置信息,从而实现配置信息的动态更新。

spring cloud bus 消息总线 原理总结

1.在config server中引入 spring cloud bus,将配置服务端也加入到消息总线中来;
2./bus/refresh请求不再发送到具体服务实例上,而是发送给Config Server,并通过destination参数指定需要更新配置的服务或实例。

相关文章:

  • 2022-12-23
  • 2021-07-28
  • 2021-07-31
  • 2021-06-14
  • 2021-11-04
  • 2021-08-26
  • 2021-09-10
  • 2022-12-23
猜你喜欢
  • 2021-07-24
  • 2021-12-02
  • 2021-11-06
  • 2022-12-23
  • 2021-07-28
  • 2021-10-05
相关资源
相似解决方案