Pumbf
Pumbf
Spring Cloud Bus links nodes of a distributed system with a lightweight message broker. This can then be used to broadcast state changes (e.g. configuration changes) or other management instructions....
@steverao Can this be explained?
我也遇到这个问题,初步判断是序列化反序列化没走同一个Converter。 反序列化 从Message 反序列化 payload 是走 BusJacksonAutoConfiguration.BusJacksonMessageConverter。但是BusJacksonMessageConverter转换到指定子类是依赖RemoteApplicationEvent里的注解@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")。但反序列化是Message里payload发现没有type值。故Jackson无法将其转换成自定义事件。 关键代码处 BusJacksonAutoConfiguration.BusJacksonMessageConverter#convertFromInternal(179)
springboot版本:2.6.11 springcloud版本:2021.0.3 springcloudalibaba版本:2021.0.1.0
> hi @pumbf @skylarkn ,if you have some idea to solve it, welcome to create pull request.If not,we will solve it later. hi , i found the reason. Because s-c-b-rocketmq...
core method: SimpleFunctionRegistry.FunctionInvocationWrapper::convertOutputMessageIfNecessary
temporarily solve this problem by overriding the bean and removing the FastJsonConverter. @skylarkn ```java /** * fix issue https://github.com/alibaba/spring-cloud-alibaba/issues/2742 * @return CompositeMessageConverter */ @Bean(RocketMQMessageConverter.DEFAULT_NAME) public CompositeMessageConverter rocketMqMessageConvert() { Set messageConverters...