Correlation Identifier - Enterprise Integration Patterns (original) (raw)
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:
- Requestor — An application that performs a business task by sending a request and waiting for a reply.
- 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.
- Request — A Message sent from the requestor to the replier containing a request ID.
- Reply — A Message sent from the replier to the requestor containing a correlation ID.
- Request ID — A token in the request that uniquely identifies the request.
- 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:
Integration Pattern Language
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
Make your cloud migration a success by translating high-level goals into conscious decisions with well-understood trade-offs.
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.