Router

Router

Router

The Router is a producer which makes it possible to route messages to other flows. You can choose to send one message to flow A, another to flow B and delete yet another.

The routing works according to mappings and a router strategy. The strategy determines which part of the message is evaluated against the mapping values.

When a mapping value is found, the message is send to the flow that is referred to. If multiple mappings satisfy, the message is send to multiple flows.

In routing, the full ConnectMessage with all associated headers and properties are always sent.

In the table below, you will find an explanation about these properties. All attributes with a ‘*’ are mandatory.

Attribute

Description

Name*

By default, we fill this out with the technical ‘tag’, followed by a serial number. Changing the name is optional.

Enabled

Set this value to true, if you want this producer to be enabled.

Default Flow

If no matching route can be found, the message will routed to this default flow.

Inter adapter routing

When set to true, Message Routing over interfaces is available. The default is false.

Mapping

Here you can set a Routing value and refer to a Flow.

By pressing , you create one (or more) extra Routing Mapping rule.

At Routing, you indicate for which returned value of a routerStrategy the message has to be routed.

Router Strategy Bean Reference*

Reference to Router Strategy Bean to be used for this Router. This bean should be added in Constructor using 'Beans' option in the menu.
The reference bean must implement the MyESBRouterStrategy interface.
The reference script must return a list of values to be compared to the mappings.

Description

Description of the specific producer. This is for documentation purposes.

 In the table below, you will find an explanation about the properties of a Mapping rule. All attributes with a ‘*’ are mandatory.

Attribute

Description

Routing value*

Here you enter the expression value on which to route.

Flow Name*

Here you enter the name of the Flow to route to.