Coordinated message flows

A coordinated message flow is a message flow in which updates to external and internal resources are committed or rolled back together within a single transaction.

If you design a message flow that includes interaction with an external user database, you can configure the message flow such that all its processing is coordinated within a transaction. This coordination ensures that all processing is either successfully completed, or no processing is completed; thus all affected resources (queues, databases, and so on) can maintain or return to a consistent state, and data integrity is preserved.

If you want to coordinate the processing of a message flow, configure it to start a transaction when a message is received by the input node. The transaction is committed (if all processing is successful) or rolled back (if at least one part of the processing is unsuccessful).

Coordination for message flows is provided on distributed platforms by WebSphere MQ and on z/OS systems by RRS. An externally-coordinated unit of work (for example, one coordinated by CICS) is not supported.

WebSphere Business Integration Message Broker provides transactional integrity in several ways:

If an error occurs during a message flow, databases are rolled back first, followed by WebSphere MQ resources. If no error occurs, databases are committed first, then WebSphere MQ resources. If an error occurs while committing a message flow, and non-XA databases are involved:

If you prefer, you can configure the behavior of a message flow to be non-transactional.

On z/OS, message flows are always coordinated by Resource Recovery Service (RRS). Message flows are always coordinated on z/OS, regardless of whether the message flow is specified as coordinated in the workbench or not.

The Error Handler sample demonstrates the use of globally-coordinated transactions, and the differences in the message flow when database updates are coordinated (the main flow) and when they are not (the error flow).

Related concepts
Message flows
Related tasks
Creating a message flow
Defining message flow content
Configuring coordinated message flows
Handling errors in message flows
Related reference
Built-in nodes
Database connections for coordinated message flows
Database support for coordinated message flows