spring-cloud-alibaba rocketmq message hasnot been sent, Caused by null

tjvv9vkg  于 2022-12-31  发布在  Spring
关注(0)|答案(4)|浏览(228)

在发送mq消息时,偶尔会报这个异常,请问Caused by null一般会由于什么原因导致了,因为是偶尔出现
com.alibaba.cloud
spring-cloud-starter-stream-rocketmq
2.2.5.RELEASE

6uxekuva

6uxekuva1#

调用异步发送消息接口,这几天观察发现请求量大的情况下失败的几率会增大,配置了失败回调队列,打印了回传的异常是:org.springframework.messaging.MessagingException: nested exception is java.util.ConcurrentModificationException, failedMessage=GenericMessage [payload=byte[142], headers={id=9f951e70-dbae-c369-3877-d8438f5f22bd, contentType=application/json, TAGS=sign, timestamp=1621476904559}]
请问下是什么问题导致的了?

5gfr0r5j

5gfr0r5j2#

@catalpa-tree能贴一下具体的报错堆栈信息吗

ugmeyewa

ugmeyewa3#

@duhenglucky 就以下2个堆栈信息,第一个是RocketMQMessageHandler打印的,然后钩子函数收到的异常信息是下面堆栈信息,再无其他信息
ERROR | AsyncSenderExecutor_9 | com.alibaba.cloud.stream.binder.rocketmq.integration.RocketMQMessageHandler$1 : 220 | RocketMQ Message hasn't been sent. Caused by null

INFO | AsyncSenderExecutor_9 | cn.medbanks.pay.domain.common.cashier.service.MQErrorHandler : 28 | order-pay-result收到发送失败消息,信息为:org.springframework.messaging.MessagingException: nested exception is java.util.ConcurrentModificationException, failedMessage=GenericMessage [payload=byte[183], headers={id=54223c6d-d178-7428-a925-fccf6688ac35, contentType=application/json, TAGS=pay, timestamp=1622802564610}]

klsxnrf1

klsxnrf14#

If it's convenient, can you provide the logging context in which this exception occurred?
Just from the brief exception information, it seems that the list collection iteration has some problems.
However, there is no code related to the iteration in the asynchronous sending information.

相关问题