I have a component that sends a message to a worker service waiting back the result.
@Autowired
private RabbitTemplate rabbit;
[...]
Object response = rabbit.convertSendAndReceive("testQ", ...);
The worker service is implemented with Apache Camel rabbitmq route:
from("rabbitmq://localhost/myExchange?declare=false&routingKey=testQ&queue=testQ")
.routeId("myCamelRoute")
.process(myProcessor)
.to("log:myLog");
myProcessor handles the message and logs out the Camel Message headers:
__TypeId__=...
breadcrumbId=...
rabbitmq.CONTENT_ENCODING=UTF-8
rabbitmq.CONTENT_TYPE=application/json
rabbitmq.CORRELATIONID=7e390b6b-d30f-4f26-ba44-33fb887db0e8
rabbitmq.DELIVERY_TAG=4
rabbitmq.EXCHANGE_NAME=
rabbitmq.PRIORITY=0
rabbitmq.REPLY_TO=amq.rabbitmq.reply-to.g2dkABNyYWJiaXRAOWU5ZjkxNDI4ZWRiAAAJgwAAADUC.5+kPXXxaXhoYo7A4T0HSZQ==
rabbitmq.ROUTING_KEY=testQ
The message header apparently contains rabbitmq.CONTENT_TYPE=application/json on the worker side but this info seems to get "lost" when the response message goes back:
o.s.a.s.c.Jackson2JsonMessageConverter : Could not convert incoming message with content-type [null]
Any idea what is wrong here?
if spring-amqp: