← Wiki

Five EIP patterns without a Mule example: what the platform does and when there is still something to build

  • 12 min read
On this page

Control Bus, Message History, Message Store, Shared Database and Remote Procedure Invocation are in the book Enterprise Integration Patterns and have no example flow in this series. Mule does not need to imitate the book’s design: in some cases a connector or the platform already does the job; in others there is something left to build, and it pays to know what before writing the first flow. Each section uses the series’ order scenario (payment, stock and invoicing) and separates what the documentation offers from what this page recommends. For what Mule and Anypoint Platform offer, the sources, consulted on 2026-12-01, are MuleSoft’s pattern mapping page and the Mule Runtime, Runtime Manager, CloudHub 2.0 and Anypoint MQ pages linked in each section.

Control Bus: commanding the running integration

The invoicing system goes into maintenance, and meanwhile the step that issues invoices has to stop without taking down the rest of the order.

The pattern in the book

The book asks how to administer a messaging system that is spread across several platforms and a wide geographic area. The solution is a Control Bus, which uses the same messaging mechanism as the application data, but on separate channels, to carry what concerns the management of the components (Control Bus). Each component is connected to two subsystems: the message flow and the Control Bus.

The diagram answers where orders travel and where management travels: the order enters the flow, and each component also connects to the Control Bus. It redraws the book’s sketch (CC BY 4.0) in the order scenario:

The order enters the message flow at Payment, goes on to Stock and then to Invoicing. Payment, Stock and Invoicing also connect, in both directions, to the Control Bus.

In Mule

The management role is played, to a large extent, by Runtime Manager. The documentation describes these commands through its UI and, for CloudHub 2.0 schedules, also through an API. It does not describe a management message channel inside the application.

What you command Where the documentation offers it Reach
Start, restart, stop and delete the application Runtime Manager The whole application
Start and stop a flow Flow Management, in hybrid and Private Cloud Edition Not available for applications on CloudHub and Runtime Fabric
Disable and re-enable a schedule CloudHub 2.0 Schedules tab Only flows with a Scheduler

In Flow Management, starting a flow does not trigger its endpoints: it only makes the flow active. The same page says the application’s own logic can start and stop flows, and that a Start or Stop made in Runtime Manager overrides that logic until someone clicks Unmanage (Flow Management).

In the XML, the initialState attribute sets whether the flow comes up started (the default) or stopped. On CloudHub and Runtime Fabric, activating a flow that came up stopped requires redeploying the application or changing the setting to started. On CloudHub, the documentation asks you not to use stopped on a flow with a Scheduler: the scheduler gets stuck in the “Running” state and cannot be managed from Runtime Manager (Flows and Subflows).

Disabling a schedule on CloudHub 2.0 also has caveats, all from the schedules documentation:

  • enabling or disabling a Scheduler redeploys the application;
  • a disabled Scheduler may still run once: a fixed-frequency one, at application startup (the page suggests a startDelay of at least five seconds to avoid it); a cron one, when the redeployment happens close to the trigger time;
  • it can become enabled again after a restart or maintenance, so you have to check the tab again.

When there is still something to build

The recommendation is to build your own command when the pause cannot depend on a redeployment or when it is finer-grained than a flow, such as suspending only one customer’s invoices. The minimal design has a management endpoint or queue, separate from the business queues and with restricted access, that writes a key to a persistent store every replica can see; the flow checks the key before acting. The key does not switch off the flow’s source. Messages keep arriving, and the flow has to say what it does with them during the pause: refuse them, return them to the queue or hold them.

Message History: knowing where the message has been

Order ORD-7101 reached invoicing with the wrong amount, and nobody knows which components touched it before that.

The pattern in the book

The book notes that the loose coupling of a messaging system makes debugging and dependency analysis harder, and asks how to analyze the path messages take. The solution is to attach a Message History to the message, the list of components it has passed through since its origin: each one, including the one that created it, adds an entry. The list goes in the header, because it is control information, kept apart from the business body. When an Aggregator joins several messages, each with its own history, the book offers two ways out: keep a tree or keep the history of only one of them (Message History).

In Mule

MuleSoft’s mapping page has no row for the pattern, and the documentation describes no component that writes that list into the message. What the documentation offers is the path recorded outside it, with OpenTelemetry:

  • traces and logs from Mule 4.11.0 (metrics, from 4.12.0);
  • in a flow trace, each component execution becomes a span, and an error’s span carries the flow stack;
  • across applications, the HTTP Listener receives the context in the W3C Trace Context format and the HTTP Request propagates it, which requires HTTP Connector 1.8 or later.

To send traces and logs to your own collector there is Direct Telemetry Stream, from 4.11.0. The documentation restricts it to the Advanced and Titanium tiers of Anypoint Platform, and those who use it lose Anypoint Monitoring’s OpenTelemetry features, such as Telemetry Exporter. The exporter is off by default, and its default trace sampler is parentbased_traceidratio with argument 0.1, which the page reads as 10%: if you need the path of every message, you have to revisit that value (OpenTelemetry Support).

The difference from the book is where the history lives. In the book, the next component reads the list in the header. In OpenTelemetry, what crosses applications is the span context, with the trace identifiers, and the path shows up in the tool that receives the spans. To simply tie together the logs of one request, Correlation Identifier shows Mule’s correlationId.

Insight, in Runtime Manager, tracks transactions and events of applications on CloudHub and on your own servers, but the page marks it as to be deprecated, points to traces as the new approach and warns that turning it on can significantly affect performance and memory.

When there is still something to build

Carrying the list in the message itself pays off when a component makes decisions based on it (for example, to avoid resending the order to a system it has already been through), when the path crosses channels or systems that do not propagate the context, or when audit requires each order’s path to be kept with the order. The recommendation is a field separate from the business data, in the envelope or in a message property, with the component name and the time, added by a DataWeave script at each step. The list grows with every hop, so it needs a limit.

Message Store: querying messages later

Customer service wants to know how many orders entered the payment channel yesterday and whether ORD-7101 was one of them, without asking anything of the application that processes the orders.

The pattern in the book

The question is how to report on messages without disturbing the loosely coupled and transient nature of the system. The solution is a Message Store, which captures information about each message in a central place: when a message is sent, a duplicate goes to a special channel, from the component itself or through a Wire Tap. Sending it fire-and-forget does not slow down the main flow, but it increases traffic, so the book allows storing only a few fields, such as the message ID, the channel and the timestamp (Message Store).

The diagram answers where what the Message Store keeps comes from. It redraws the book’s sketch (CC BY 4.0) in the order scenario:

A message goes through Payment, on to Stock and then to Invoicing. Each of the three sends a copy to a special channel, which takes them to the Message Store.

In Mule

The documentation describes no component that plays the Message Store’s role; the copy can go out through a Wire Tap, with the limits described in the tap’s caveats, and storing it is up to the project.

An Anypoint MQ queue does not replace the store. A message’s TTL goes up to two weeks, and the Message Browser is for inspecting the queue, and it touches the queue as it does: returning the messages is a NACK, deleting them is an ACK, and payloads over 1 MB are not shown. On a FIFO queue, the documentation warns that viewing messages there can keep other consumers from accessing them (Anypoint MQ queues).

When there is still something to build

When someone needs to search messages by business key, keep the record for a defined period or reprocess what went through. The recommendation is a table written with the Database Connector, with the fields the book mentions (ID, channel, timestamp) plus the orderId; the whole body goes in only if there is a use for it, with a retention period and sensitive data masked. If the record must not be lost, Async alone is not enough, because the main flow never learns that the write failed: write before moving on, accepting the delay, or publish the copy to a queue of its own, with Guaranteed Delivery, and let a consumer write to the table.

Shared Database: integrating through the same data

The orders application writes the order to a table, and the billing application reads that same table to issue the invoice.

The pattern in the book

The setting is applications built independently, in different languages and platforms, that need to share information quickly and consistently. The solution is for them to store the data in a single shared database, which keeps the data consistent and leaves simultaneous updates to transaction management. The book points out the cost: designing a schema that serves them all is very hard, and there is also the political pressure to split the databases (Shared Database).

In Mule

The documentation maps the pattern to the Database Connector, which it spells “DataBase Connector” (Enterprise Integration Patterns Using Mule). With it, a Mule application is one more reading from and writing to the database. The common schema and the rule for who changes each piece of data remain project decisions. To group operations in a transaction, see Transactional Client.

When there is still something to build

The pattern is an architecture choice, with nothing to assemble beyond database access. The recommendation is to use it when the applications already share the database, treating the shared tables as a contract: one owner per table, schema changes announced to readers and, preferably, a single application writing. In a new integration, first compare it with an API in front of the data owner, which is the next pattern.

Remote Procedure Invocation: asking the owner

Before charging the order, the orders application asks the warehouse whether there is stock, by calling it directly.

The pattern in the book

The need is to share data and processes in a responsive way. The solution is to build each application as a component that encapsulates its own data and offers an interface to the others: an application that needs a piece of data, or wants to change it, calls the owner, which looks after integrity and can change its internal model. The book warns that coupling remains tight, especially when the order of the calls matters, and that it is common to design the integration as if it were a single application (Remote Procedure Invocation).

In Mule

The documentation maps the pattern to Mule APIs, which, according to it, are designed to work like this procedure call, and also to requests to external APIs (Enterprise Integration Patterns Using Mule). Reserving stock with an HTTP Request that waits for the reply, the time limit on that wait and the care needed when repeating a POST are in Request-Reply, with a runnable example.

When there is still something to build

What you build is the API itself, in the application that owns the data, and the call in the consumer. This route makes sense when the caller needs the reply to carry on. If the order only needs to notify the warehouse, a message on a Point-to-Point Channel keeps the order from waiting for the warehouse to answer.

In the MuleSoft documentation

The page Enterprise Integration Patterns Using Mule maps two of these five: Shared Database (DataBase Connector) and Remote Procedure Invocation (Mule APIs). Control Bus, Message History and Message Store have no row, and the page does not include the book’s System Management group. A missing row does not mean the platform is no help, as Runtime Manager and OpenTelemetry above show. The patterns with a page and an example are in the catalog and, by component name, in the index by component.