BrightX opened a new issue, #695: URL: https://github.com/apache/rocketmq-spring/issues/695
https://github.com/apache/rocketmq-spring/blob/b3963f76589a5348370ea990c15e3878806e2710/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/support/DefaultRocketMQListenerContainer.java#L543-L551 ![image](https://github.com/user-attachments/assets/ee4b23df-39d5-4c79-a970-29e2a69bf910) 我注意到这里当要转换的类型为 `byte[]` 时,会调用`spring-messaging` 的 `ByteArrayMessageConverter` 的 `convertFromInternal`,而这个方法会原样返回 `payload`。而截图的 [`L551` 行](https://github.com/apache/rocketmq-spring/blob/b3963f76589a5348370ea990c15e3878806e2710/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/support/DefaultRocketMQListenerContainer.java#L543-L551),将 `payload` 设置成了 `str`,导致 `String` 到 `byte[]` 的类型转换异常 `ClassCastException: java.lang.String cannot be cast to [B` 。 ```java org.springframework.messaging.converter.ByteArrayMessageConverter#convertFromInternal return message.getPayload(); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@rocketmq.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org