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

后端 未结 2 727
南方客
南方客 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条回答
  •  梦毁少年i
    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.

提交回复
热议问题