Publish Message TO Anypoint MQ
In this tutorial we will demonstrate how can we publish the message to Anypoint MQ
The Anypoint MQ connector provides publish-subscribe messaging to Mule apps using the Anypoint MQ cloud service.
Anypoint MQ supports a wide range of messaging use cases, such as enterprise messaging patterns, asynchronous communications between microservices, and IoT. Anypoint MQ also has a REST API for publishing or consuming messages using frameworks such as node.js, Java, Go, and DevOps bash scripts.
The Publish operation enables you to create a new Anypoint MQ message and send it to the specified destination: queue, FIFO queue, or message exchange. With it, you can configure both the content of the message and all the headers and properties you need.
To use this connector, you should be familiar with Anypoint Studio, Anypoint Connectors, and application flows. The Anypoint MQ connector is free, but connecting to the service in Anypoint Platform requires a license.
Drag and drop HTTP listener to trigger the request
Let’s create a mule service which accept input as JSON
Add Byte Array to String to convert the JSON request in readable format
configure the MQ connection
Follow the below steps to configure the connection:
- Drag the name of the operation from the Mule Palette to the canvas, and then select it.
- Click the green plus sign to the right of Connector configuration.
- In Anypoint Platform, click MQ > Destinations.
- Copy the URL for your region to the URL field in Studio.
- In Anypoint Platform, click MQ > Client Apps.
- If needed, create a client app.
- Copy the Client App ID value from Anypoint Platform to the Client App ID field in Studio.
- Copy the Client Secret value from Anypoint Platform to the Client Secret field in Studio.
- Click Test Connection to verify the Anypoint MQ Default subscriber.
- Click OK.
Where Destination will be the MQ name and Message ID will be any unique identifier for the message
Test the mule application from soapUI
Message is successfully enqueue to Anypoint MQ
Goto MQ configuration in Anypoint platform
Click on Message Browser and now we can see the message on MQ
how to configure in Soap UI.Any help would be much appreciated.
Please follow the steps as per this blog to create SOAP UI project – http://mulesy.com/2018/05/08/anypoint-mq-rest-apis/