We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onMessage
byte[]
rocketmq-spring/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/support/DefaultRocketMQListenerContainer.java
Lines 543 to 551 in b3963f7
我注意到这里当要转换的类型为 byte[] 时,会调用spring-messaging 的 ByteArrayMessageConverter 的 convertFromInternal,而这个方法会原样返回 payload。而截图的 L551 行,将 payload 设置成了 str,导致 String 到 byte[] 的类型转换异常 ClassCastException: java.lang.String cannot be cast to [B 。
spring-messaging
ByteArrayMessageConverter
convertFromInternal
payload
L551
str
String
ClassCastException: java.lang.String cannot be cast to [B
org.springframework.messaging.converter.ByteArrayMessageConverter#convertFromInternal return message.getPayload();
The text was updated successfully, but these errors were encountered:
No branches or pull requests
rocketmq-spring/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/support/DefaultRocketMQListenerContainer.java
Lines 543 to 551 in b3963f7
我注意到这里当要转换的类型为
byte[]
时,会调用spring-messaging
的ByteArrayMessageConverter
的convertFromInternal
,而这个方法会原样返回payload
。而截图的L551
行,将payload
设置成了str
,导致String
到byte[]
的类型转换异常ClassCastException: java.lang.String cannot be cast to [B
。The text was updated successfully, but these errors were encountered: