Hello,

I am using camel version 2.10.0.redhat-60024 ( the redhat version of the jar
) and jboss-a-mq-6.2.0.redhat-133 as my JMS provider and trying to do a
simple request reply pattern with the following two routes

*Producer side*

from(endPointUrl).routeId("2")
                        .setHeader("JMSExpiration", 
constant(System.currentTimeMillis() +
10000))
                .to(ExchangePattern.InOut,
"jms:entityQueue?disableTimeToLive=true&requestTimeout=4000&replyTo=outputq")
                        .log("After coming out of request resply") ;

*Consumer side*

        
                from( "jms:entityQueue?disableTimeToLive=true").routeId("5")
                                
                                .log(">> Payload Received : ${body}")

The behavior I am seeing seems to me that the producer side waits for 4s (
requestTimeout = 4000 ), times out and then puts the message on the queue,
which is picked up on the consumer side and then the reply is sent to the
output queue when fails with no subscriber as the producer already timed
out. I must be doing something wrong, been wrestling with it for a couple of
days now. Any help is much appreciated. The full log below

22:26:50,024 INFO  [org.apache.camel.processor.interceptor.Tracer]
(http-localhost/127.0.0.1:8080-1)
ID-DLS014MA4251185-57084-1473301230802-25-8 >>> (2)
from(direct://processSoapEndPoint) --> log://body%20is%20$%7Bbody%7D <<<
Pattern:InOnly,
Headers:{breadcrumbId=ID-DLS014MA4251185-57084-1473301230802-25-7},
BodyType:String, Body:venu
22:26:50,024 INFO  [body is ${body}] (http-localhost/127.0.0.1:8080-1)
Exchange[ExchangePattern:InOnly, BodyType:String, Body:venu]
22:26:50,025 INFO  [org.apache.camel.processor.interceptor.Tracer]
(http-localhost/127.0.0.1:8080-1)
ID-DLS014MA4251185-57084-1473301230802-25-8 >>> (2)
log://body%20is%20$%7Bbody%7D -->  <<< Pattern:InOnly,
Headers:{breadcrumbId=ID-DLS014MA4251185-57084-1473301230802-25-7},
BodyType:String, Body:venu
22:26:50,025 INFO  [org.apache.camel.processor.interceptor.Tracer]
(http-localhost/127.0.0.1:8080-1)
ID-DLS014MA4251185-57084-1473301230802-25-8 >>> (2)  -->  <<<
Pattern:InOnly, Headers:{JMSExpiration=10000,
breadcrumbId=ID-DLS014MA4251185-57084-1473301230802-25-7}, BodyType:String,
Body:venu
22:26:50,026 INFO  [org.apache.camel.processor.interceptor.Tracer]
(http-localhost/127.0.0.1:8080-1)
ID-DLS014MA4251185-57084-1473301230802-25-8 >>> (2)  -->
jms://entityQueue?disableTimeToLive=true&replyTo=outputq&requestTimeout=4000
<<< Pattern:InOnly,
Headers:{breadcrumbId=ID-DLS014MA4251185-57084-1473301230802-25-7,
JMSExpiration=1473304794724}, BodyType:String, Body:venu
22:26:54,116 WARN 
[org.apache.camel.component.jms.reply.PersistentQueueReplyManager] (Camel
(camel-26) thread #71 - JmsReplyManagerTimeoutChecker[outputq]) Timeout
occurred after 4000 millis waiting for reply message with correlationID
[Camel-ID-DLS014MA4251185-57084-1473301230802-25-9]. Setting
ExchangeTimedOutException on (MessageId:
ID-DLS014MA4251185-57084-1473301230802-25-7 on ExchangeId:
ID-DLS014MA4251185-57084-1473301230802-25-8) and continue routing.
22:26:54,119 ERROR [org.apache.camel.processor.DefaultErrorHandler] (Camel
(camel-26) thread #71 - JmsReplyManagerTimeoutChecker[outputq]) Failed
delivery for (MessageId: ID-DLS014MA4251185-57084-1473301230802-25-7 on
ExchangeId: ID-DLS014MA4251185-57084-1473301230802-25-8). Exhausted after
delivery attempt: 1 caught: org.apache.camel.ExchangeTimedOutException: The
OUT message was not received within: 4000 millis due reply message with
correlationID: Camel-ID-DLS014MA4251185-57084-1473301230802-25-9 not
received. Exchange[Message: venu]:
org.apache.camel.ExchangeTimedOutException: The OUT message was not received
within: 4000 millis due reply message with correlationID:
Camel-ID-DLS014MA4251185-57084-1473301230802-25-9 not received.
Exchange[Message: venu]
        at
org.apache.camel.component.jms.reply.ReplyManagerSupport.processReply(ReplyManagerSupport.java:133)
[camel-jms-2.10.0.redhat-60024.jar:2.10.0.redhat-60024]
        at
org.apache.camel.component.jms.reply.TemporaryQueueReplyHandler.onTimeout(TemporaryQueueReplyHandler.java:61)
[camel-jms-2.10.0.redhat-60024.jar:2.10.0.redhat-60024]
        at
org.apache.camel.component.jms.reply.CorrelationTimeoutMap.onEviction(CorrelationTimeoutMap.java:53)
[camel-jms-2.10.0.redhat-60024.jar:2.10.0.redhat-60024]
        at
org.apache.camel.component.jms.reply.CorrelationTimeoutMap.onEviction(CorrelationTimeoutMap.java:30)
[camel-jms-2.10.0.redhat-60024.jar:2.10.0.redhat-60024]
        at
org.apache.camel.support.DefaultTimeoutMap.purge(DefaultTimeoutMap.java:209)
[camel-core-2.10.0.redhat-60024.jar:2.10.0.redhat-60024]
        at
org.apache.camel.support.DefaultTimeoutMap.run(DefaultTimeoutMap.java:159)
[camel-core-2.10.0.redhat-60024.jar:2.10.0.redhat-60024]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
[rt.jar:1.7.0_55]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
[rt.jar:1.7.0_55]
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
[rt.jar:1.7.0_55]
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
[rt.jar:1.7.0_55]
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_55]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_55]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_55]

22:26:54,180 INFO  [org.apache.camel.processor.interceptor.Tracer] (Camel
(camel-27) thread #69 - JmsConsumer[entityQueue])
ID-DLS014MA4251185-57084-1473301230802-26-3 >>> (5)
from(jms://entityQueue?disableTimeToLive=true) -->  <<< Pattern:InOut,
Headers:{JMSDeliveryMode=2, JMSPriority=4, JMSTimestamp=1473305210033,
breadcrumbId=ID-DLS014MA4251185-57084-1473301230802-25-7,
JMSReplyTo=queue://outputq, JMSDestination=queue://entityQueue,
JMSMessageID=ID:DLS014MA4251185-57065-1473301202541-19:1:10:1:1,
JMSType=null,
JMSCorrelationID=Camel-ID-DLS014MA4251185-57084-1473301230802-25-9,
JMSRedelivered=false, JMSXGroupID=null, JMSExpiration=0}, BodyType:String,
Body:venu
22:26:54,182 INFO  [org.apache.camel.processor.interceptor.Tracer] (Camel
(camel-27) thread #69 - JmsConsumer[entityQueue])
ID-DLS014MA4251185-57084-1473301230802-26-3 >>> (5)  --> log[>> Payload
Received : ${body}] <<< Pattern:InOut, Headers:{JMSDeliveryMode=2,
JMSPriority=4, JMSTimestamp=1473305210033,
breadcrumbId=ID-DLS014MA4251185-57084-1473301230802-25-7,
JMSReplyTo=queue://outputq, JMSDestination=queue://entityQueue,
JMSMessageID=ID:DLS014MA4251185-57065-1473301202541-19:1:10:1:1,
JMSType=null,
JMSCorrelationID=Camel-ID-DLS014MA4251185-57084-1473301230802-25-9,
JMSRedelivered=false, JMSXGroupID=null, JMSExpiration=0}, BodyType:String,
Body:venu
22:26:54,183 INFO  [5] (Camel (camel-27) thread #69 -
JmsConsumer[entityQueue]) >> Payload Received : venu
22:26:54,184 INFO  [org.apache.camel.processor.interceptor.Tracer] (Camel
(camel-27) thread #69 - JmsConsumer[entityQueue])
ID-DLS014MA4251185-57084-1473301230802-26-3 >>> (5) log[>> Payload Received
: ${body}] --> log[>> Payload Received Message: ${body}] <<< Pattern:InOut,
Headers:{JMSDeliveryMode=2, JMSPriority=4, JMSTimestamp=1473305210033,
breadcrumbId=ID-DLS014MA4251185-57084-1473301230802-25-7,
JMSReplyTo=queue://outputq, JMSDestination=queue://entityQueue,
JMSMessageID=ID:DLS014MA4251185-57065-1473301202541-19:1:10:1:1,
JMSType=null,
JMSCorrelationID=Camel-ID-DLS014MA4251185-57084-1473301230802-25-9,
JMSRedelivered=false, JMSXGroupID=null, JMSExpiration=0}, BodyType:String,
Body:venu
22:26:54,186 INFO  [5] (Camel (camel-27) thread #69 -
JmsConsumer[entityQueue]) >> Payload Received Message: venu
22:26:54,210 WARN 
[org.apache.camel.component.jms.reply.PersistentQueueReplyManager] (Camel
(camel-26) thread #72 - PersistentQueueReplyManager[outputq]) Reply received
for unknown correlationID
[Camel-ID-DLS014MA4251185-57084-1473301230802-25-9]. The message will be
ignored: ActiveMQTextMessage {commandId = 73, responseRequired = true,
messageId = ID:DLS014MA4251185-57065-1473301202541-323:1:6:3:1,
originalDestination = null, originalTransactionId = null, producerId =
ID:DLS014MA4251185-57065-1473301202541-323:1:6:3, destination =
queue://outputq, transactionId = null, expiration = 0, timestamp =
1473305214193, arrival = 0, brokerInTime = 1473305214194, brokerOutTime =
1473305214206, correlationId =
Camel-ID-DLS014MA4251185-57084-1473301230802-25-9, replyTo =
queue://outputq, persistent = true, type = null, priority = 4, groupID =
null, groupSequence = 0, targetConsumerId = null, compressed = false, userID
= null, content = org.apache.activemq.util.ByteSequence@52c34612,
marshalledProperties = org.apache.activemq.util.ByteSequence@122d7231,
dataStructure = null, redeliveryCounter = 0, size = 0, properties =
{CamelJmsDeliveryMode=2,
breadcrumbId=ID-DLS014MA4251185-57084-1473301230802-25-7},
readOnlyProperties = true, readOnlyBody = true, droppable = false,
jmsXGroupFirstForConsumer = false, text = venu}




--
View this message in context: 
http://camel.465427.n5.nabble.com/JMS-message-with-Inout-pattern-tp5787336.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to