为了账号安全,请及时绑定邮箱和手机立即绑定

启动消费者时RabbitListener报错

2018-09-06 15:41:15.867  WARN 13880 --- [cTaskExecutor-1] s.a.r.l.ConditionalRejectingErrorHandler : Execution of Rabbit message listener failed.


org.springframework.amqp.rabbit.listener.exception.ListenerExecutionFailedException: Listener method could not be invoked with the incoming message

Endpoint handler details:

Method [public void com.ecdata.core.rabbitMQ.TopicReceiver.receiveMessage(com.ecdata.model.RabbitMQ.MQMessage,java.util.Map<java.lang.String, java.lang.Object>,com.rabbitmq.client.Channel)]

Bean [com.ecdata.core.rabbitMQ.TopicReceiver@308e465b]

Caused by: org.springframework.messaging.handler.annotation.support.MethodArgumentNotValidException: Could not resolve method parameter at index 0 in public void com.ecdata.core.rabbitMQ.TopicReceiver.receiveMessage(com.ecdata.model.RabbitMQ.MQMessage,java.util.Map<java.lang.String, java.lang.Object>,com.rabbitmq.client.Channel): 1 error(s): [Error in object 'message': codes []; arguments []; default message [Payload value must not be empty]]

这里说错误原因是Payload value must not be empty,但是启动消费者时payload肯定是空啊,不知道怎么解决

正在回答

1 回答

消费端报错,出现问题的是你的接口有问题,消费者启动后没有消息的话并不会执行呀。可能是你之前有不比配格式的消息

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

启动消费者时RabbitListener报错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信