title: get exchange related properties like ExchangePattern ID and BodyType in message
body: <p>I'm new to Camel. I'm trying to read a file from one location, making some change in the file content and sending the file to another location. I trying to get exchange related information added in the file like the following:</p>
  
  <pre><code>Exchange[ExchangePattern: InOnly, BodyType: String, Body:
  Test Message from custom processor:
  Text from input file.
  </code></pre>
  
  <p>First line in the above sample is not coming. So far I wrote the following code:</p>
  
  <p>applicationContext.xml:</p>
  
  <pre><code>&lt;bean id="customProcessor" class="com.javacodegeeks.camel.CustomProcessor"/&gt;
  &lt;camelContext xmlns="http://camel.apache.org/schema/spring"&gt;
  &lt;route&gt;
       &lt;from uri="file:C:\\inputdir\\" /&gt;     
       &lt;process ref="customProcessor"/&gt;            
       &lt;to uri="file:C:\\outputdir\\" /&gt;
  &lt;/route&gt;
  </code></pre>
  
  <p>CustomProcessor.java:</p>
  
  <pre><code>public class CustomProcessor implements Processor {
  
  public void process(Exchange exchange) throws Exception {
      String msgBody = exchange.getIn().getBody(String.class);
      exchange.getIn().setBody("Test Message from custom processor: " + msgBody);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Main class:</p>
  
  <pre><code>public static final void main(String[] args) throws Exception {
      ApplicationContext appContext = new ClassPathXmlApplicationContext(
              "applicationContext.xml");
      CamelContext camelContext = SpringCamelContext.springCamelContext(
              appContext, false);
      try {
          camelContext.start();
          Thread.sleep(200000);
      } finally {
          camelContext.stop();
      }
  }
  </code></pre>