Skip to content
Art2link ESB v2.02 LTS HomeDocumentationBlogContact
Patterns/Transformation/Content filter

Content filter

Give each destination only the fields it needs. Where the message filter decides which messages go to a port, a content filter decides which fields of a message go — a projection on the way out.

The canonical message is deliberately complete. A given destination rarely wants all of it, and sometimes must not see parts of it — pricing a logistics partner has no business reading, internal flags a customer should never receive. A content filter is a send-side map that projects canonical down to the slim shape that destination should get.

canonical (full) orderIdcustomerlines[]costmargininternalFlag Content filter project / strip to destination orderIdcustomerlines[] cost, margin, flag withheld

It is the natural complement of the content enricher: enrich on the way in to make canonical complete, filter on the way out to give each subscriber its appropriate view. Because it runs at the send edge, the shared message on the bus stays whole for everyone else.

In Art2link this is an outbound map on the send port. The canonical Customer is projected onto a reduced shape — say PartnerCustomer — that carries only the fields the partner is entitled to; every other field, internal identifiers and the customer’s tax id among them, is simply not mapped across. The bus still holds the full canonical record — only the projection leaves the port.

Filtering is also a control. Treat “what must this destination never see” as a requirement, not an afterthought — the content filter is where data minimisation per recipient is enforced.