Commit edc52d5f4f80333368997d80e2fcbd34dea59dd7
Committed by
Gitee
1 parent
063d5e3a
修复 Redis Pub/Sub 广播消费的容器 默认未启动的问题
默认配置没有启动Redis Pub/Sub 广播消费的容器 导致发出消息后 消费者收不到消息 Signed-off-by: 筱龙缘 <794334212@qq.com>
Showing
1 changed file
with
1 additions
and
1 deletions
yudao-framework/yudao-spring-boot-starter-mq/src/main/java/cn/iocoder/yudao/framework/mq/config/YudaoMQAutoConfiguration.java
| ... | ... | @@ -56,7 +56,7 @@ public class YudaoMQAutoConfiguration { |
| 56 | 56 | /** |
| 57 | 57 | * 创建 Redis Pub/Sub 广播消费的容器 |
| 58 | 58 | */ |
| 59 | - @Bean | |
| 59 | + @Bean(initMethod = "start", destroyMethod = "stop") | |
| 60 | 60 | public RedisMessageListenerContainer redisMessageListenerContainer( |
| 61 | 61 | RedisMQTemplate redisMQTemplate, List<AbstractChannelMessageListener<?>> listeners) { |
| 62 | 62 | // 创建 RedisMessageListenerContainer 对象 | ... | ... |