Name

Recipient List — Routes messages to a number of dynamically specified recipients

Usage

The Recipient List pattern sends a copy of the incoming message to a list of endpoints. The list of endpoints is dynamically generated at runtime.

The Recipient List pattern can appear anywhere in the body of a route. It must be followed by two or more destinations.

Properties

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

Table 23. Recipient List Properties

NameDescription
LanguageSpecifies the expression language used to process the expression.
Cache SizeSpecifies the size of the cache that caches producers for reuse in the recipient list. The default is 1000. A value of -1 disables the cache.
DelimiterSpecifies a delimiter to separate the list of endpoint URIs in the generated recipient list.
DescriptionSpecifies 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.
Executor Service RefSpecifies a reference for looking up the executorService to use for thread pool management.
Id

Specifies a unique identifier for the endpoint.

The tooling automatically generates an id for a node when it is created, but you can remove that id or replace it with your own. The Camel debugger requires all nodes with a breakpoint set to have a unique id.

You can use the id to refer to endpoints in your Camel XML file.

Ignore Invalid EndpointsSpecifies whether router will skip steps that are invalid without throwing an exception. The default is Disabled.
On Prepare Ref

Specifies a reference to a bean implementing a custom onPrepare processor that processes the original message before it is passed to the list of specified destinations.

This property enables you to deep clone mutable message bodies, so each destination receives a separate copy of the entire exchange. You can use this property to execute any kind of logic on a message exchange.

Parallel AggregateSpecifies whether the aggregate method on the AggregationStrategy can be called concurrently. Enable this option only when the AggregationStrategy is thread-safe. The default is Disabled.
Parallel ProcessingSpecifies whether the recipient list can send messages to multiple recipients concurrently. The default is Disabled.
Share Unit of WorkSpecifies whether all of the resulting exchanges are considered a single shared unit of work. The default is Disabled.
Stop On ExceptionSpecifies whether the node will stop all processing if one of the endpoints receiving a message throws an exception. The default is Disabled.
Strategy Method Allow NullSpecifies whether the aggregate method is not used when there was no data to enrich. When disabled, the aggregate method is not used. When enabled, null values are used as the oldExchange when POJOs are used as the AggregationStrategy. The default is Disabled.
Strategy Method NameSpecifies the name of the aggregate method to use when using POJOs as the AggregationStrategy (instead of the Camel API). For details, see Aggregator.
Strategy RefSpecifies a reference for looking up the AggregationStrategy in the registry.
StreamingSpecifies whether the recipient list works in streaming mode. The default is Disabled.
TimeoutSpecifies the amount of time, in milliseconds, the node will attempt to deliver a message before timing out.

Related topics

Expression and Predicates Languages
Configuring the route editor