Camel Components

Remove Properties

The Remove Properties EIP allows you to remove one or more Exchange properties, based on pattern syntax.

Options

The Remove Properties eip supports the following options which are listed below.

Name Description Default Type

note

The note for this node.

String

description

The description for this node.

String

disabled

Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime.

false

Boolean

pattern

Required Name or pattern of properties to remove. Supports exact match, wildcard (ending with ), and regular expression (all case-insensitive).

String

excludePattern

Name or pattern of properties to not remove. You can use comma to separate multiple patterns.

String

Message Body

The message body at each side of the Remove Properties EIP: EIP input is the body it needs, EIP output the body after it, and Steps the body its own steps start with.

Side Body Description

EIP output

unchanged

Removes exchange properties: the body stays as it was.

The bodies are the ones with the default options. A side that is not listed is not known, and tooling does not guess it. The carriers are described in the Camel Catalog.

Exchange properties

The Remove Properties eip has no exchange properties.

Remove Exchange Properties by pattern

The Remove Properties EIP supports pattern matching by the following rules in the given order:

  • match by exact name

  • match by wildcard

  • match by regular expression

Remove all properties

For example to remove all properties use * as follows:

  • Java

  • XML

  • YAML

from("seda:b")
  .removeProperties("*")
  .to("mock:result");
<route>
  <from uri="seda:b"/>
  <removeProperties pattern="*"/>
  <to uri="mock:result"/>
</route>
- route:
    from:
      uri: seda:b
      steps:
        - removeProperties:
            pattern: "*"
        - to:
            uri: mock:result
Be careful to remove all exchange properties as Camel uses internally exchange properties to keep state on the Exchange during routing. So use this with care. You should generally only remove custom exchange properties that are under your own control.

Remove properties by pattern

To remove all exchange properties that start with Foo then use Foo* as shown:

  • Java

  • XML

  • YAML

from("seda:b")
  .removeProperties("Foo*")
  .to("mock:result");
<route>
  <from uri="seda:b"/>
  <removeProperties pattern="Foo*"/>
  <to uri="mock:result"/>
</route>
- route:
    from:
      uri: seda:b
      steps:
        - removeProperties:
            pattern: "Foo*"
        - to:
            uri: mock:result

See Also

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