Recipient component
The Recipient component allows you to route messages to a number of dynamically specified recipients.
Configuration
The recipients will receive a copy of the same Exchange, and the component will send them sequentially to the recipients. Every recipient has a label on its connection that indicates the order in which the component will send the messages. Check the Exchange pattern option to how the component can route the messages.
Exchange pattern
Options
One way
Request reply
(default)
Description
The routing of the messages will always be sequential in the order that is shown on the connection labels. This option only has an impact on when the message is send to the next recipient.
By default the component will use the Request reply
option. This means that the
component will only send the message to the next recipient when the current recipient
has processed the message. The component basically sends the message to one recipient
at a time. This is the option you want to select when the order really matters,
for example: recipient number 1 has to process the message before it can be sent
to recipient number 2 and so on.
When the recipients don't have to wait on each other before processing
the message you can select the One way
option. The specified order is still
respected, but the component won't wait until the message is fully processed by
one recipient before sending it to the next. This option will also improve the
perfomance of the flow, because multiple recipients can process the message at the
same time.
Remarks
- The response to the caller will be the existing Exchange body before reaching the first
One way
component in the flow.