Set Out Header EIP (deprecated)

This EIP is deprecated. The SetOutHeader EIP allows you to set an header on the out message of your exchange.

Options

The Set Out Header EIP supports 1 options which are listed below:

Name Description Default Type

headerName

Required Name of message header to set a new value

String

Examples

The following example shows how to use the SetOutHeader EIP

RouteBuilder builder = new RouteBuilder() {
    public void configure() {
        from("direct:a")
            .setOutHeader("myHeader", constant("test"))
            .to("direct:b");
    }
};

And the same example using XML:

<camelContext xmlns="http://camel.apache.org/schema/spring">
    <route>
        <from uri="direct:a"/>
        <setOutHeader headerName="myHeader">
            <constant>test</constant>
        </setOutHeader>
        <to uri="direct:b"/>
    </route>
</camelContext>