此内容没有您所选择的语言版本。

A.9. Static Recipient List


Overview

A recipient list, shown in Figure A.6, “Static Recipient List Pattern”, 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 A.6. Static Recipient List Pattern

Example ServiceMix EIP route

Example A.16, “ServiceMix EIP Static Recipient List” 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 A.16. ServiceMix EIP Static Recipient List

<eip:static-recipient-list service="test:recipients"
                           endpoint="endpoint">
  <eip:recipients>
    <eip:exchange-target service="test:messageFilter" />
    <eip:exchange-target service="test:trace4" />
  </eip:recipients>
</eip:static-recipient-list>
Copy to Clipboard Toggle word wrap

Equivalent Apache Camel XML route

Example A.17, “Apache Camel Static Recipient List Using XML” shows how to define an equivalent route using Apache Camel XML configuration.

Example A.17. Apache Camel Static Recipient List Using XML

<route>
  <from uri="jbi:endpoint:http://progress.com/demos/test/recipients/endpoint"/>
  <to uri="jbi:service:http://progress.com/demos/test/messageFilter"/>
  <to uri="jbi:service:http://progress.com/demos/test/trace4"/>
</route>
Copy to Clipboard Toggle word wrap
Note
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 Section 4.4, “Pipes and Filters” for more details.

Equivalent Apache Camel Java DSL route

Example A.18, “Apache Camel Static Recipient List Using Java DSL” shows how to define an equivalent route using the Apache Camel Java DSL.

Example A.18. Apache Camel Static Recipient List Using Java DSL

from("jbi:endpoint:http://progress.com/demos/test/recipients/endpoint").
    to("jbi:service:http://progress.com/demos/test/messageFilter", "jbi:service:http://progress.com/demos/test/trace4");
Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat