activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonin <>
Subject Issue with in-out pattern
Date Mon, 10 Nov 2014 12:13:04 GMT

we are trying to use the in-out pattern with the following route:

        <route id="route_fileTest" reform:name="Test1"
            <from uri="file:/BIFiles/input"/>
			<setExchangePattern pattern="InOut"/>
            <to uri="activemq:queue:queue1?replyTo=queue2"/>
			<to uri="file:/BIFiles/output"/>

We have an MDB listening to queue1. This beans reads the bytes of the file,
makes some modifications and then sends the bytes back with a ByteMessage
(the MDB does set the replyTo destination and the CorrelationID).

If we don't attempt to edit the name of the file:

  public void sendByteMessage(final byte[] bytes, final Message onReplyOf)
throws JMSException {"Sending message");
        JmsTemplate jmsTemplate = new JmsTemplate(connectionFactory);
        MessageCreator msgCreator = new MessageCreator() {
            public Message createMessage(Session session) throws
JMSException {
                BytesMessage msg = session.createBytesMessage();     
                return msg;
        jmsTemplate.send(onReplyOf.getJMSReplyTo(), msgCreator);

this works as expected. A file dropped in the input folder is consumed, and
a new file is created in the output folder. The  name of the file in the
output folder is the transaction id (as it is explained in the Camel

However when we try to modify the name of the output file from the MDB by
doing the following:

msg.setStringProperty("camelFileName", "new.txt");

we get an error in Camel:
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
create directory: \.camel (could be because of denied permissions)

We are using Camel 2.12, ActiveMq-camel 5.8 

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message