camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From igoldsmith <>
Subject JMS ReplyTo not sent for InOnly Pattern
Date Thu, 04 Nov 2010 16:11:28 GMT

I'm trying to setup a fairly simple scenario where I use Camel to pull a
document out of a directory on the file system and send it to a JMS queue. 
I have an application that will read the message from the queue and send a
response to the queue specified in the replyTo header of the inbound
message.  I will then specify another route in Camel that will read the
response from the replyTo queue and drop this into another directory on the
file system.

The problem I have is that I cannot seem to get Camel to set the replyTo
header for the InOnly pattern that this scenario forces.  Of course, if
anyone can think of a better way of building this request response pattern
for file->queue->file then I'm all ears.

I've found a fair amount of information on this, including Camel-3012 and
related threads.  I'm currently using ActiveMQ 5.4.1 with Camel 2.5.0.  I
have a route configured using the following:

        <route autoStartup="true" id="File2JMS">
            <from uri="file:/home/soa/camel"/>
ue:borrower.resp&amp;preserveMessageQos=true" pattern="InOnly"/>

The only reason I have the pattern specified is that I've used that
attribute to force InOut to verify that the JMSReplyTo header does get set
correctly with this pattern.

>From the docs it seems that I should also be able to use disableReplyTo=true
with the InOut pattern, but this doesn't include the ReplyTo header either.

The DEBUG level logging for this shows the correct endpoint, but as you can
see doesn't include the replyTo header in the message that gets sent:

2010-11-04 12:05:51,425 | DEBUG | About to process file:
GenericFile[/home/soa/camel/testmsg] using exchange:
Exchange[/home/soa/camel/testmsg] |
org.apache.camel.component.file.FileConsumer | Camel Thread 0 -
2010-11-04 12:05:51,442 | DEBUG | >>>>
Exchange[/home/soa/camel/testmsg] | org.apache.camel.processor.SendProcessor
| Camel Thread 0 - file:///home/soa/camel
2010-11-04 12:05:51,462 | INFO  | Connector vm://localhost Started | | Camel Thread 0 -
2010-11-04 12:05:51,597 | DEBUG | Executing callback on JMS Session:
{id=ID:pmdemo.soa.local-55577-1288886465168-4:0:1,started=false} |
org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate | Camel
Thread 0 - file:///home/soa/camel
2010-11-04 12:05:51,649 | DEBUG | Sending JMS message to:
queue://borrower.req with message: ActiveMQTextMessage {commandId = 0,
responseRequired = false, messageId = null, originalDestination = null,
originalTransactionId = null, producerId = null, destination = null,
transactionId = null, expiration = 0, timestamp = 0, arrival = 0,
brokerInTime = 0, brokerOutTime = 0, correlationId = null, replyTo = null,
persistent = false, type = null, priority = 0, groupID = null, groupSequence
= 0, targetConsumerId = null, compressed = false, userID = null, content =
null, marshalledProperties = null, dataStructure = null, redeliveryCounter =
0, size = 0, properties = {CamelFileLength=21,
CamelFileParent=/home/soa/camel, CamelFileLastModified=Thu Nov 04 12:05:51
EDT 2010, CamelFileRelativePath=/home/soa/camel/testmsg,
CamelFileAbsolute=true, CamelFileNameOnly=testmsg, CamelFileName=testmsg,
CamelFileAbsolutePath=/home/soa/camel/testmsg}, readOnlyProperties = false,
readOnlyBody = false, droppable = false, text = Another test message
} | org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate | Camel
Thread 0 - file:///home/soa/camel

If anyone has any ideas as to what I'm doing wrong, or any thoughts on a
better way to deliver my scenario then I'm all ears.  Thanks in advance.


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

View raw message