1
votes

ActiveMQ 5.5.1

<c:route>
    <c:from uri="jetty:http://0.0.0.0:8055/ws/despacho" />
    <c:to uri="bean:despachoHandler" />
    <c:to uri="activemq:queue:copom.out.test" pattern="InOut" />
</c:route>

The message appears queued, but I can't consume it. After some time I get the timeout and the message goes to ActiveMQ.DLQ.

org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 20000 millis due reply message with correlationID: Camel-ID-SSP-SGPF-GITSAD-58215-1359134232568-0-3 not received.

If I change it to pattern="InOnly" I'm able to consume the message normally.

What's going on?

2

2 Answers

12
votes

You should learn the EIP patterns.

When using InOut you are doing a request-reply EIP pattern http://camel.apache.org/request-reply.html

And in this case, a message is sent to a JMS queue, and as you do InOut, then a reply message is expected to be send back to the queue defined in the JMSReply property (which Camel will set to a temporary queue name if not explicit set otherwise).

And if there is no reply message coming back after 20 seconds Camel fails with a timed out exception. You can configure the length of the timeout.

So you have to decide if you are doing a request reply EIP (InOut) or a event message (InOnly) http://camel.apache.org/event-message.html

0
votes

We got similar issue when JMSCorrelationID= was set our system and Camel in/out was not able to receive response from Request Reply queue. On removing JMSCorrelationID= being set by our code, Camel start running successfully receiving message from Request Reply queue.