Request-Reply Pattern Using Correlation ID Mule4 Using ActiveMQ

Agenda

  • Introduction.
  • Create a request/reply queue.
  • Create and an exchange and bind it with the request-queue.
  • Develop a Mule 4 flow to comply with the correlation-id.

Introduction

When the requester generates a request message, it assigns a request ID to the request—an identifier that is distinct from these for all other presently outstanding requests, that is, requests that do not yet have replies. When the replier treats the request, it keeps the request ID and adds that ID to the reply as a correlation ID. When the requester processes the reply, it uses the correlation ID to identify which request the reply is for. This is called a Correlation Identifier because of the way the caller uses the identifier to associate (i.e., match, show the relationship) each reply to the request that generated it.

Create a Request/Reply Queue

Request queue is created: address-queue.