第一种模型:交换机类型为topic,路由key为“#”,这是简单的使用模型
当前Spring Cloud Rabbit的版本为2.1.2
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
<version>2.1.2.RELEASE</version>
</dependency>
其在application.yml文件中的配置内容如下:
spring:
cloud:
stream:
default-binder: rabbit
binders:
rabbit1:
type: rabbit
environment:
spring:
rabbitmq:
host: 192.168.1.105
port: 5672
virtual-host: /
username: admin
password: admin
rabbit2:
type: rabbit
environment:
spring:
r