LibraryToggle FramesPrintFeedback

Static Recipient List


A recipient list, shown in Figure 53, is a type of router that sends each incoming message to multiple different destinations. The ServiceMix EIP recipient list is restricted to processing InOnly and RobustInOnly exchange patterns. Moreover, the list of recipients must be static. This pattern maps to the recipient list with fixed destination pattern in Apache Camel.

Figure 53. Static Recipient List Pattern

Static recipient list pattern

Example ServiceMix EIP route

Example 29 shows how to define a static recipient list using the ServiceMix EIP component. Incoming messages are copied to the test:messageFilter endpoint and to the test:trace4 endpoint.

Example 29. ServiceMix EIP Static Recipient List

<eip:static-recipient-list service="test:recipients"
    <eip:exchange-target service="test:messageFilter" />
    <eip:exchange-target service="test:trace4" />

Equivalent Apache Camel XML route

Example 30 shows how to define an equivalent route using Apache Camel XML configuration.

Example 30. Apache Camel Static Recipient List Using XML

  <from uri="jbi:endpoint:"/>
  <to uri="jbi:service:"/>
  <to uri="jbi:service:"/>


The preceding route configuration appears to have the same syntax as a Apache Camel pipeline pattern. The key difference is that the preceding route is intended for processing InOnly message exchanges, which are processed in a different way. See Pipes and Filters for more details.

Equivalent Apache Camel Java DSL route

Example 31 shows how to define an equivalent route using the Apache Camel Java DSL.

Example 31. Apache Camel Static Recipient List Using Java DSL

    to("jbi:service:", "jbi:service:");

Comments powered by Disqus