Caused by: java.lang.NoSuchMethodException: hello.Receiver.receiveMessage([B)

Caused by: java.lang.NoSuchMethodException: hello.Receiver.receiveMessage([B)

Spring AMQ 集成 RabbitMQ,使用postman调试topic报错

  • 报错内容

Caused by: org.springframework.amqp.rabbit.listener.exception.ListenerExecutionFailedException: Failed to invoke target method ‘receiveMessage’ with argument type = [class [B], value = [{[B@393264a4}]

Caused by: java.lang.NoSuchMethodException: hello.Receiver.receiveMessage([B)

原因是发送时编码问题,需要增加

content_encoding":"UTF-8","content_type":"text/plain"
  • 使用postman调试RabbitMQ topic
    完整postman配置

认证配置 authorization

你可能感兴趣的:(MQ,Spring,AMQ,spring,AMQ,rabbit,postman)