Remove Header

The Remove Header EIP allows you to remove a single header from the Message.

Options

The Remove Header eip supports 2 options, which are listed below.

Name Description Default Type

name

Name of header to remove.

String

headerName

Deprecated Name of header to remove (deprecated use name instead).

String

description

Sets the description of this node.

DescriptionDefinition

Example

We want to remove a header with key "myHeader" from the message:

from("seda:b")
  .removeHeader("myHeader")
  .to("mock:result");

And in XML:

<route>
  <from uri="seda:b"/>
  <removeHeader name="myHeader"/>
  <to uri="mock:result"/>
</route>

See Also

Camel provides the following EIPs for removing headers or exchange properties: