Enterprise Integration Patterns

A canonical pattern language of 65 messaging-based integration patterns, codified by Gregor Hohpe and Bobby Woolf in their 2003 book Enterprise Integration Patterns, providing a shared vocabulary for designing message-driven systems.

Problem

Enterprise systems are built from heterogeneous applications that must exchange data but differ in technology, data format, and timing requirements. Without a shared vocabulary and reusable solutions, integration code is ad-hoc, brittle, and hard to communicate. Teams repeatedly solve the same routing, transformation, and reliability problems from scratch.

Solution / Explanation

Hohpe & Woolf identified 65 recurring problems and their solutions across seven categories. The patterns build on four integration styles (file transfer, shared database, remote procedure invocation, messaging) and focus primarily on messaging as the most flexible and scalable style.

The fundamental building blocks are:

  • Message: a discrete packet of data exchanged between applications.
  • Channel: the transport pipe through which messages flow.
  • Router: a component that directs messages to the appropriate channel.
  • Transformer: a component that converts message format or content.
  • Endpoint: the connection point between an application and the messaging system.

Pattern Taxonomy

1. Message Construction

Defines what a message is and how it is structured.

PatternSummary
Command MessageDirects a receiver to perform an action
Document MessageTransfers data between systems
Event MessageNotifies receivers of a significant occurrence
Request-ReplyTwo-way messaging with a reply channel
Return AddressSpecifies where to send the reply
Correlation IdentifierLinks request and reply messages
Message SequenceMaintains ordering across a set of messages
Message ExpirationSets a validity time-limit on a message
Format IndicatorIdentifies the message data format/version

2. Messaging Channels

Describes transport mechanisms.

PatternSummary
Point-to-Point ChannelExactly one consumer receives each message
Publish-Subscribe ChannelAll subscribers receive a copy
Datatype ChannelSingle channel per message type
Dead Letter ChannelHolds undeliverable/expired messages
Guaranteed DeliveryPersists messages so none are lost
Channel AdapterConnects an external system to the message channel
Messaging BridgeJoins two separate messaging systems
Message BusCentral hub for all system communication

3. Message Routing

Directs messages to the right destination.

PatternSummary
Pipes and FiltersChains processing steps sequentially
Content-Based RouterRoutes based on message content
Message FilterSelectively passes or discards messages
Dynamic RouterRoutes based on runtime-configured rules
Recipient ListSends to a dynamic list of destinations
SplitterBreaks a message into individual parts
AggregatorCombines related messages into one
ResequencerRestores the correct message order
Scatter-GatherBroadcasts and consolidates responses
Routing SlipMessage carries its own routing instructions
Process ManagerOrchestrates multi-step workflows
Message BrokerDecouples sender routing knowledge

4. Message Transformation

Modifies message content for compatibility.

PatternSummary
Message TranslatorConverts between data formats
Envelope WrapperAdds routing metadata around the payload
Content EnricherAdds missing data from an external source
Content FilterRemoves irrelevant fields
Claim CheckStores large payloads externally; passes a ticket
NormalizerConverts varying formats to a canonical form
Canonical Data ModelShared intermediate format for multi-system translation

5. Messaging Endpoints

How applications connect to the messaging system.

PatternSummary
Messaging GatewayEncapsulates messaging code from application logic
Transactional ClientEnsures reliable, atomic message sending
Polling ConsumerActively pulls messages from the channel
Event-Driven ConsumerPassively notified when a message arrives
Competing ConsumersMultiple instances consume the same queue (load-balancing)
Durable SubscriberRetains messages while subscriber is offline
Idempotent ReceiverHandles duplicate messages safely
Service ActivatorTriggers domain logic via a message

6. Systems Management

Operational patterns for monitoring and control.

PatternSummary
Control BusSeparate administrative message channel
Wire TapNon-intrusive copy for monitoring
Message HistoryRecords the path a message has taken
Message StorePersists messages for auditing or replay
Smart ProxyIntercepts messages for tracking
Test MessageValidates system health
Channel PurgerRemoves test/stale messages from a channel

Key Contributors

  • Gregor Hohpe & Bobby Woolf — authors of the book (Addison-Wesley, 2003).
  • Popularised by frameworks: Apache Camel, Spring Integration, Mule ESB, NServiceBus, MassTransit all implement this vocabulary.

When to Use

  • Designing or documenting an integration between systems.
  • Reviewing or naming existing integration code (giving it a shared vocabulary).
  • Deciding how to route, transform, or aggregate messages between services.
  • Building an Event-Driven Architecture with well-defined message contracts.

Trade-offs

BenefitCost
Shared vocabulary reduces miscommunicationLarge pattern set has a learning curve
Solutions proven across decades of enterprise integrationPatterns from 2003; some assume heavyweight ESB — apply selectively
Framework support reduces boilerplateOver-engineering risk: not every system needs all patterns