## Name

Dynamic Router — Routes messages based on rules specified by the recipients at start up

## Usage

The Dynamic Router pattern uses an expression to determine how to route messages. As each processor completes, the expression is evaluated to determine the next location. The route completes when the expression evaluates to `null`.

| Important
The Dynamic Router's expression must be able to evaluate to `null`. If it cannot, the route will slip into an infinite processing loop.

The Dynamic Router pattern can be used anywhere in the body of a route.

## Properties

Table 12 describes the properties you can specify using the properties editor.

Table 12. Dynamic Router Properties

Name | Description
--- | ---
Expression | Specifies the expression used to determine the next processing step in the chain. The expression must evaluate to `null` for the route to complete.
language | Specifies the expression language used to process the expression.
Inherit Error Handler | Specifies whether the node should use the error handler configured for the route. The default is `Disabled`.
Ignore Invalid Endpoints | Specifies whether router will skip steps that are invalid without throwing an exception. The default is `Disabled`.
Uri Delimiter | Specifies a delimiter to separate the list of endpoint URIs the router generates.
Id | Specifies a unique identifier for the endpoint. The Id can be used to refer to the endpoint in the Camel XML file.
Description | Specifies a text description for the node. This description is included in the generated XML file, but it is informational only. It is not used by Apache Camel.

## Related topics

Expression and Predicates Languages
Configuring the route editor