Execution of Rabbit message listener failed, and no ErrorHandler has been set. Failed to invoke target method with argument type = [class [B],

后端 未结 2 708
南方客
南方客 2021-01-13 06:31

I am using spring amqp rabbitmq, and sending messages using

Message message = MessageBuilder
.withBody(item.toString().getBytes())
.setReplyTo(\"importReply         


        
相关标签:
2条回答
  • 2021-01-13 07:03

    Or you can add .setContentType="text/plain" and the converter will be able to convert to String for you.

    0 讨论(0)
  • 2021-01-13 07:15

    Since you are using POJO for message listening you can't get deal with messages.

    Your Foundation#importExchange should accept message body (in your case byte[]) and return something appropriate to be for reply message body.

    The replyHandler just has to implement MessageListener.

    The Framework will do for you the correlation stuff.

    0 讨论(0)
提交回复
热议问题