Content Filter
Explanation
Section titled “Explanation”A Content Filter is a pattern from Enterprise Integration Patterns (see the article of that name). It answers one question: how do you simplify handling a large message when you care about only a few data items?
The answer is to remove the unimportant data items from the message. Only the important items stay. The message itself is still delivered. It is just smaller and simpler.
How it differs from related patterns
- Message Filter works at the channel level. It removes whole messages that a component does not want to receive. A Content Filter removes data inside a message instead.
- Content Enricher is the opposite. It is a specialized transformer that adds missing information from an external source. A Content Filter takes information away.
A simple way to remember it: a Message Filter decides which messages pass. A Content Filter decides which parts of a message pass.
Example
Section titled “Example”An order system sends a large order message with customer details, line items, notes and shipping data. A billing component needs only the order number and the total. A Content Filter sits in front of billing. It keeps those two items and removes the rest. Billing receives a smaller message.
Trade-offs
Section titled “Trade-offs”The pattern works by discarding data items from a message. Once removed, they are no longer in that message. Decide carefully which items are truly unimportant for the receiver.
Diagram source
flowchart LR A["Large message: order no, total, customer, notes, shipping"] --> F[Content Filter] F --> B["Small message: order no, total"]Checks
Section titled “Checks”- Where a consumer needs only a few items from a large message, the document names a Content Filter that removes the other items.
- The document distinguishes removing data inside a message (Content Filter) from dropping whole messages (Message Filter).
Related
Section titled “Related”- Message Filter
- Content Enricher and Content Filter
- Content-based Router
- Message Translator
- Enterprise Integration Patterns
- Pipes and Filters
- Claim Check
- Message Structure
Sources
Section titled “Sources”- Content Filter - Enterprise Integration Patterns — enterpriseintegrationpatterns.com, accessed 2026-11-09
- Message Filter - Enterprise Integration Patterns — enterpriseintegrationpatterns.com, accessed 2026-11-09
- Content Enricher - Enterprise Integration Patterns — enterpriseintegrationpatterns.com, accessed 2026-11-09