title: Using apache camel xml route, how can I set a customized fileName from a JMS message?
body: <p>With the java JMS API, I got from a DB an array of bytes and then I'm sending it to an ActiveMQ as  a javax.jms.BytesMessage.  After that with camel I want to put the file on a location, </p>
  
  <p>I have this route in camel:</p>
  
  <pre><code>    &lt;route&gt;
          &lt;from uri="activemq:queue.fileOuput"/&gt;
          &lt;convertBodyTo type="java.nio.ByteBuffer"/&gt;
          &lt;to uri="file://C:/output/"/&gt;
      &lt;/route&gt;
  </code></pre>
  
  <p>But my problem is that my file in <code>c:\output\</code> directory, I got the file with the message id as the file name, like 
   <code>queue-preVerificacion-fileoutput-ID-jmachine-57401-1347652410053-0-1-1-1-1</code>
  but I want to put the name I have in the database, like <code>MyFile.xml</code>.</p>
  
  <p>I have tried to set a message property like fileName and file:name, and also I saw in the apache document that I need to put a header "org.apache.camel.file.name", but with jms I don't know how to do it.</p>
  
  <p>So my question is how can I put a customized name in the camel route?</p>
  
  <p>Thanks to all.</p>