Skip to content
Art2link ESB v2.02 LTS HomeDocumentationBlogContact
Patterns/Routing/Recipient list

Recipient list

Deliver one message to exactly the set of destinations its content calls for — two of five today, three tomorrow. A recipient list is a content-based fan-out where more than one branch can match.

Where publish-subscribe delivers to everyone interested and a router picks one branch, a recipient list selects a subset. The selection is data-driven: each candidate send port subscribes on a condition, and the message’s content decides which conditions are true. A subscriber whose condition fails simply does not receive this message.

message recipients = {X, Z} Recipient list select subset Port X — delivered Port Y — skipped Port Z — delivered

This is the routing half of a scatter-gather: fan a request to a chosen set of services, then gather their replies. On its own, a recipient list is fire-and-forget — it does not wait for or combine responses.

In Art2link the chosen subset falls out of independent subscriptions: because every send port is evaluated separately, more than one can match the same message. Promote the selectors that decide membership — here which carriers a shipment needs — and give each carrier port its own predicate:

EXPRESSIONFedEx send port
{{Message.MessageType}} == "Shipment" && {{Promoted.Shipment.UseFedEx}} == "true"

The UPS and DHL ports carry the same shape on their own flags, so a shipment fans out to exactly the carriers it selects — not all, not one. Where membership is computed rather than a stored flag, call a custom function in the predicate instead.

Keep the list in data, not code. Compute the recipient set from the message or a configuration table so onboarding a recipient is a data change, not a redeploy.