/**
* 解析处理队列
* @return
*/
@Bean
public Queue analyzeQueue() {
Map<String, Object> args = new HashMap<>(4);
args.put(RabbitConstant.XDL_EXCHANGE, RabbitConstant.XDL_EXCHANGE_ANALYZE);
return new Queue(RabbitConstant.ANALYZE_QUEUE, true, false, false, args);
}
/**
* 死信队列
* @return
*/
@Bean
public Queue xdlAnalyzeQueue() {
return new Queue(RabbitConstant.XDL_QUEUE_ANALYZE, true, false, false);
}
@Bean
public TopicExchange analyzeTopicExchange() {
return new TopicExchange(RabbitConstant.ANALYZE_EXCHANGE);
}
/**
* dlx directExchange
* @return
*/
@Bean
public TopicExchange xdlAnalyzeExchange() {
return new TopicExchange(RabbitConstant.XDL_EXCHANGE_ANALYZE);
}
/**
*普通队列的Exchange与Queue通过路由键进行绑定
*/
@Bean
public Binding analyzeBinding() {
return BindingBuilder.bind(analyzeQueue()).to(analyzeTopicExchange()).with(RabbitConstant.ANALYZE_ROUTING_KEY);
}
/**
*死信队列的Exchange与Qu
rabbitmq死信队列
最新推荐文章于 2022-08-12 15:00:00 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)