Skip to content
Art2link ESB v2.02 LTS HomeDocumentationBlogContact
Patterns/Foundational messaging/Publish-subscribe channel

Publish-subscribe channel

Publish once; the bus hands a copy to every subscriber whose filter matches. Consumers come and go by changing subscriptions — the producer never knows. This is the native shape of the bus and the engine under normalize onto the bus.

A producer publishes a canonical message to the bus and stops there. Each consuming send port declares a subscription — usually a filter over a promoted variable — and the bus delivers an independent copy to every match.

Because producer and consumers are fully decoupled, scaling the fan-out is configuration, not code. A new destination is a new subscription; retiring one is deleting its subscription. None of it reopens the producer.

Producer publish once BUS Send port ASend port BSend port C Consumer AConsumer BConsumer C

Where subscriptions filter on content rather than taking everything, you are building a content-based router — same mechanism, sharper predicates.

In Art2link every interested consumer is its own send port carrying the same subscription. An OrderPlaced event feeding warehouse, billing and analytics is three send ports, each with:

EXPRESSIONeach subscriber send port
{{Message.MessageType}} == "OrderPlaced"

Adding a fourth consumer later is a new send port with the same expression — the producer never changes, and no existing subscriber is touched.

Each copy is independent. One subscriber failing or being slow does not hold up the others — every send port carries its own retry and dead-letter behaviour.