Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Variable

Type

Description

id

String

the input message id

body

Object

the input body

in.body

Object

the input body

out.body

Object

the output body

header.foo

Object

refer to the input foo header

headers.foo

Object

refer to the input foo header

in.header.foo

Object

refer to the input foo header

in.headers.foo

Object

refer to the input foo header

out.header.foo

Object

refer to the out header foo

out.headers.foo

Object

refer to the out header foo

property.foo

Object

refer to the foo property on the exchange

sys.foo

String

refer to the system property

exception.message

String

New in Camel 2.0. Refer to the exception.messsage on the exchange, is <tt>null</tt> if no exception set on exchange

date:command:pattern

String

New in Camel 1.5. Date formatting using the java.text.SimepleDataFormat patterns. Supported commands are: now for current timestamp, in.header.xxx or header.xxx to use the Date object in the IN header with the key xxx. out.header.xxx to use the Date object in the OUT header with the key xxx.

bean:bean expression

Object

New in Camel 1.5. Invoking a bean expression using the Bean language. Specifying a method name you must use dot as separator.

Samples

In the Spring XML sample below we filter based on a header value:

...

Where orderIdGenerator is the id of the bean registered in the Registry. If using Spring then its the Spring bean id.

If we want to declare which method to invoke on the order id generator bean we must prepend .method name such as below where we invoke the generateId method.

Code Block
java
java

   from("direct:order").transform().simple("OrderId: ${bean:orderIdGenerator.generateId}").to("mock:reply");

Dependencies

The Bean language is part of camel-core.