SpringCloudBus消费者失效

type
status
date
slug
summary
tags
category
icon
password
同时使用Bus和自定义stream的channel,不恰当配置会导致bus的消费者失效(bus的默认topic springCloudBus没有消费者)。
上面的配置中除了使用bus,还定义了一个topic sync_topic, 该topic的消费者bean名称为syncData。
但是请注意:
💡
SpringCloudBus底层使用的是SpringCloudStream,其原理是使用stream自动配置了一个channel,topic默认为springCloudBus消费者bean默认为busConsumer
上面的配置definition: syncData ,覆盖掉了默认配置,但有没有补上bus的消费者bean,所以bus会失效。正确配置应该包含bus的consumer:definition: busConsumer;syncData
 
  • GitTalk

© aya 2024-2025