Header
Since Camel 1.5
The Header Expression Language allows you to extract values of named headers.
Example usage
The
recipientList
EIP can utilize a header:
-
Java
-
XML
-
YAML
from("direct:a").recipientList(header("myHeader"));
<route>
<from uri="direct:a" />
<recipientList>
<header>myHeader</header>
</recipientList>
</route>
- route:
from:
uri: direct:a
steps:
- recipientList:
expression:
header:
expression: myHeader
In this case, the list of recipients are contained in the header 'myHeader'.