|
@@ -50,11 +50,15 @@ public class TopicRabbitConfig {
|
|
|
}
|
|
|
|
|
|
@Bean
|
|
|
+ public Queue mVIEWQueue() {
|
|
|
+ return new Queue(TopicRabbitConfig.MVIEW);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Bean
|
|
|
TopicExchange exchange() {
|
|
|
return new TopicExchange(TopicRabbitConfig.TOPICE);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
//将firstQueue和topicExchange绑定,而且绑定的键值为topic.man
|
|
|
//这样只要是消息携带的路由键是topic.man,才会分发到该队列
|
|
|
@Bean
|
|
@@ -74,4 +78,9 @@ public class TopicRabbitConfig {
|
|
|
return BindingBuilder.bind(modelQueue()).to(exchange()).with(TopicRabbitConfig.MODEL);
|
|
|
}
|
|
|
|
|
|
+ @Bean
|
|
|
+ Binding bindingExchangeMessage4() {
|
|
|
+ return BindingBuilder.bind(modelQueue()).to(exchange()).with(TopicRabbitConfig.MVIEW);
|
|
|
+ }
|
|
|
+
|
|
|
}
|