camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leechj <>
Subject ProducerTemplate.extractFutureBody() Getting "response" before a response is sent
Date Wed, 10 Sep 2014 14:25:53 GMT

I'm using ProducerTemplate with the InOut ExchangePattern to try to use a
request/response with AMQP. I have done this successfully provided my
consumer is quick to perform it's task. However, I wanted to simulate the
consumer taking a little longer to process the message and send a response
back, so I inserted a Thread.sleep(5000) in the consumer Processor.

When I do this however, the extractFutureBody() method doesn't wait for the
response, it just returns the message that it originally sent. It won't wait
for a response from the server, it just makes up it's own response and then
I lose the reply message eventually sent by my consumer

I've also tried using just a ProducerTemplate.request() method, which also
gives me similar results. 

Can anyone tell me what I'm doing wrong? I'm using Camel 2.13.0



View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message