title: How to set a header to a value from a properties file in Apache Camel
body: <p>Is it possible to set a message header to a value read from a properties file, using the camel <em>Properties Component</em>? I can set such properties to URI options, but I'm unable to set them as a header values.</p>
  
  <p>I need something like this:</p>
  
  <pre><code>&lt;camel:setHeader headerName="actionId"&gt;
      &lt;camel:constant&gt;{{onus.transPosting.RtSFailed}}&lt;/camel:constant&gt;
  &lt;/camel:setHeader&gt;
  </code></pre>
  
  <p>where <code>onus.transPosting.RtSFailed</code> is a property key set on a file imported using camel Properties Component.</p>
  
  <p>Note: I'm using Apache Camel 2.10.1</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Using the <code>&lt;propertyPlaceholder&gt;</code> as suggested by <a href="http://camel.465427.n5.nabble.com/using-values-from-a-properties-file-in-setHeader-method-td5154287.html" rel="nofollow">this discussion</a> did not work and it causes an exception: </p>
  
  <p><code>Caused by: org.apache.camel.language.simple.types.SimpleParserException: Unknown function: onus.transPosting.RtSFailed</code></p>