← Wiki

Mule components and the EIP patterns

  • 6 min read
On this page

To start from a pattern’s name, use the catalog of integration patterns in Mule. This page goes the other way: it starts from a component you already use in Mule 4 and shows which patterns from the book Enterprise Integration Patterns it is made of.

A component can implement more than one pattern. Choice is both a Content-Based Router and a Message Filter; it was Mule, not the book, that put the two in one component. Each pattern keeps its own page, and the page for one points to the other. Pattern names are the book’s, in English.

Routing and splitting

Mule component Patterns in the book Pages
Choice Content-Based Router, when each route leads to a destination; Message Filter, when only the route for accepted messages does any processing Content-Based Router, Message Filter
For Each Splitter, when it processes one item of the collection at a time; the delivery part of the Recipient List, when it walks the computed list of recipients Splitter, Recipient List
Parallel For Each Splitter with the items in parallel, and a built-in Aggregator: it returns the collection of results Splitter, Aggregator
Scatter-Gather Scatter-Gather, which the book describes as delivery to several destinations followed by an Aggregator Scatter-Gather, Recipient List, Aggregator
Aggregators module Aggregator, with size-based, time-based and group-based aggregators Aggregator

Channels and messaging

Mule component Patterns in the book Pages
Anypoint MQ queue Point-to-Point Channel; Guaranteed Delivery; Message Expiration, through the queue’s TTL Point-to-Point Channel, Guaranteed Delivery, Message Expiration
Anypoint MQ message exchange Publish-Subscribe Channel, with one queue bound per subscriber Publish-Subscribe Channel
Anypoint MQ dead letter queue Dead Letter Channel Dead Letter Channel
Anypoint MQ Subscriber Event-Driven Consumer; Polling Consumer, through the Consume operation; Competing Consumers, with several replicas on the same queue Event-Driven Consumer, Polling Consumer, Competing Consumers
VM Connector Point-to-Point Channel inside the runtime; Request-Reply and Return Address, through Publish Consume; Competing Consumers, through the listener’s consumers; Guaranteed Delivery, with persistent queues; Event-Driven Consumer, through the VM Listener; Polling Consumer, through the Consume operation Point-to-Point Channel, Request-Reply, Return Address, Competing Consumers, Guaranteed Delivery
Connectors (Database, Salesforce, SFTP…) Channel Adapter Channel Adapter

Message and transformation

Mule component Patterns in the book Pages
Transform Message (DataWeave) Message Translator; Content Filter, when it removes fields; the computing part of the Recipient List Message Translator, Content Filter, Recipient List
Target variables Content Enricher: they store the fetched data without overwriting the payload Content Enricher
correlationId Similar to the Correlation Identifier, but it is for following the execution through the logs, not for matching a reply to its request Correlation Identifier
Object Store A part of several patterns: it holds the Correlation Identifier’s pending requests, the Idempotent Receiver’s IDs, the Claim Check’s data and the Process Manager’s state Correlation Identifier, Idempotent Receiver, Claim Check, Process Manager

Endpoints and errors

Mule component Patterns in the book Pages
HTTP Listener Event-Driven Consumer; the replier’s side of a Request-Reply Event-Driven Consumer, Request-Reply
HTTP Request Synchronous Request-Reply Request-Reply
Idempotent Message Validator Idempotent Receiver Idempotent Receiver
Scheduler Polling Consumer, followed by a read Polling Consumer
Try and transactions Transactional Client Transactional Client
On Error Continue and On Error Propagate Invalid Message Channel, when the handling sends the invalid message to a queue of its own; they decide the ACK or NACK that takes the message to the Dead Letter Channel’s DLQ Dead Letter Channel; Invalid Message Channel

Integration styles

Mule component Patterns in the book Pages
File Connector File Transfer: writes the file on one side and consumes it on the other File Transfer
Database Connector Shared Database: the Mule application is one more reading from and writing to the shared database Patterns without an example
Mule APIs Remote Procedure Invocation: the application that owns the data offers it through an API Patterns without an example, Request-Reply

System management

None of these components implements a pattern from the book on its own: the rows point to substitutes or to parts of the assembly.

Mule component Patterns in the book Pages
Async Wire Tap, with its own Try in the branch; the copying part of a Message Store Wire Tap, Patterns without an example
Runtime Manager (platform) To a large extent, the management role in a Control Bus Patterns without an example
OpenTelemetry (runtime feature) An alternative to Message History: the path stays outside the message Patterns without an example

Outside the book

Two components that every Mule developer uses have no pattern of their own in the book. They are listed here with the closest pattern, for readers who arrive through them.

Mule component Closest pattern Why it is outside
Until Successful Guaranteed Delivery Repeats the processing inside the flow until it succeeds or runs out of attempts. The book guarantees delivery in the messaging system, by storing the message; retrying a call is an application decision
Batch Splitter and Aggregator Splits a large set of records, processes them in steps and combines the results by block. It is batch processing of records, not routing of messages between applications. The MuleSoft documentation lists it under Splitter, and the Splitter page explains why the series stays with For Each