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.

Create a Custom Connector Using XML SDK and Deploy it in Anypoint Exchange

Introduction

XML SDK is an alternative approach to build custom modules in Mulesoft. This approach is comparatively easier to build compared to the already existing JAVA Mule SDK. Creating a custom module in Mule SDK is similar to creating a Mule application. This document is focused on demonstrating the steps to build a custom module using the XML SDK and deploying it in Anypoint Exchange. We will create a custom connector in Mule 4 that will perform basic arithmetic operations like addition and subtraction

Requirements

Application/Service