Enterprise Integration Patterns
Messaging Patterns
HOME PATTERNS RAMBLINGS ARTICLES TALKS DOWNLOAD BOOKS CONTACT
Messaging Patterns
Correlation IdentifierCorrelation IdentifierMessaging Patterns » Message Construction

My application is using Messaging to perform a Request-Reply and has received a reply message.

How does a requestor that has received a reply know which request this is the reply for?

Each reply message should contain a Correlation Identifier, a unique identifier that indicates which request message this reply is for.

There are six parts to Correlation Identifier:

  1. Requestor — An application that performs a business task by sending a request and waiting for a reply.
  2. Replier — Another application that receives the request, fulfills it, then sends the reply. It gets the request ID from the request and stores it as the correlation ID in the reply.
  3. Request — A Message sent from the requestor to the replier containing a request ID.
  4. Reply — A Message sent from the replier to the requestor containing a correlation ID.
  5. Request ID — A token in the request that uniquely identifies the request.
  6. Correlation ID — A token in the reply that has the same value as the request ID in the request.

... Read the entire pattern in the book Enterprise Integration Patterns

Related patterns:

Remote Procedure Invocation, Message, Selective Consumer, Message Sequence, Messaging, Request-Reply, Return Address

Further reading:


Creative Commons Attribution License

You can reuse the following elements under the Creative Commons Attribution license: pattern icon, pattern name, problem and solution statements (in bold), and the sketch. Other portions are protected by copyright.

Enterprise Integration Patterns book cover

Enterprise Integration Patterns
The de-facto language for designing asynchronous, distributed systems. Over 100,000 copies sold.

Software Architect Elevator book cover

The Software Architect Elevator
Rethink the role of architects as a connecting element across organizational layers. Acquire the technical, communication, and organizational skills to succeed in this new role.

Cloud Strategy book cover

Cloud Strategy
Make your cloud migration a success by translating high-level goals into conscious decisions with well-understood trade-offs.

Platform Strategy book cover

Platform Strategy
Platforms can boost innovation through harmonization, but they aren't easy to build. Learn from over a decade of designing and rolling out IT platforms.