MuleSoft Anypoint MQ is a multi-tenant, cloud-based messaging service that enables reliable and scalable asynchronous communication between applications and services. It supports sophisticated messaging patterns and facilitates seamless integration across various platforms.
Integrated seamlessly with Anypoint Platform, Anypoint MQ offers features like role-based access control, client management, and pre-built connectors. While specific error handling implementations will vary based on situations, business needs, and organizational procedures, the fundamental strategy for message-driven integrations tends to follow a similar pattern.
A typical approach involves these steps:
- When an error occurs, it’s caught by the designated error handling mechanism.
- The original message, sent to a source queue, is augmented with extra information useful for potential resubmission. A delivery counter is maintained to track how many times a message has been processed.
- The enriched message is then published to a dedicated error queue.
- After a specified delay, messages in the error queue are processed. Based on the retry count, the message is either re-queued to the original queue for another attempt, or, if the retry limit is exceeded, moved to a dead-letter queue for further investigation and handling.
What is Anypoint MQ REM?
Anypoint MQ REM provides the solution to resubmit messages from the dead-letter queue back to the source queue. Because Anypoint MQ facilitates asynchronous communication between applications, its integration with the Anypoint Platform allows for seamless connectivity and management within the broader Anypoint ecosystem. Anypoint REM (Resubmit Error Messages) is a dashboard, built as a Web API using MuleSoft Platform API and Anypoint Studio.
This acts as a dashboard for Anypoint MQ that allows you to:
- View messages in the error/dead-letter queue
- Resubmit each individual message to the source queue
- Resubmit all messages at once
- Refresh messages if a new message has arrived
- View statistics/information on what the source and dead-letter/error queue are, how many messages there are, when the last message was sent, and if there are particular messages sent multiple times
So why use Anypoint MQ REM? Since MuleSoft does not have native functionality to manage messages on a queue in terms of resubmission to other queues, this application provides the tools needed to do so. With this dashboard, a customer can monitor errors and resubmit messages so that their integrations can continue without interruption.
How does Anypoint MQ REM work?
Before we see the list of messages that we can then resubmit, there are steps we’ll need to follow. These six steps involve choosing and configuring our Anypoint Platform so that we can access these messages. The steps include:
- Login
- Organization
- Environment
- Client app
- Region
- Queues
1. Login
Your Anypoint Platform login credentials are required to access the dashboard. Passwords and personal platform data are not saved or logged for security purposes; your password remains encrypted. Upon successful login, you can proceed to select your Organization or Business Group. If login fails, an error page will appear, prompting you to re-login.
2. Organization
Once you have successfully logged in, select the Organization or Business Group within Anypoint Platform where Anypoint MQ has been enabled.
3. Environment
After choosing the Organization or Business Group, choose the Environment.
4. Client App
Next, select the Client App that you configured on Anypoint MQ. This is a critical step as it allows us to access Anypoint MQ from the outside by providing us with client-id and client-secret.
5. Region
Anypoint MQ queues are located in specific geographic regions, which we select when configuring our Anypoint Platform architecture and deployments. Thus, our next step is to select the Region for our queues.
6. Queues
Lastly, we will select the two remaining primary elements: the dead-letter queue, where our messages will be placed after failing delivery attempts, and the source queue, where we will manually resubmit the messages.
After following these steps, we can access our dashboard to view all the messages present in the dead-letter queue. We can also see:
- Information (names) of the two queues (source and dead-letter)
- Number of messages present in the dead-letter queue
- Information on the most present messages
- Information on when the last message was sent
Through the dashboard, we can act on multiple levels using also the extra information that is provided to us, such as which messages have gone wrong most often. To navigate the features and capabilities of Anypoint MQ REM, watch the steps in this video.
Why do we need a dashboard?
A dashboard helps us understand which messages are experiencing errors and how often the errors happen.
Anypoint MQ REM extends the platform’s functionality and provides users with greater control and visibility over their message queues. It also decouples error resolution from the source system, streamlining the error-handling process. This reduces manual effort, saving valuable human resources and minimizing potential for message loss. With the Anypoint MQ REM dashboard, there are benefits like:
- Better visibility and interactivity: We can quickly and easily resubmit error messages using our synthetic error message view
- Real-time updates: If new messages arrive or we resubmit a message, we can refresh the dashboard to see error messages in real time
- Problem discovery: The same message can fail multiple times. With the information provided by this dashboard we can view it and resubmit it again
Extend business capabilities with Anypoint MQ
Organizations juggle diverse platforms, systems and integrations, leading to connectivity chaos. With Anypoint MQ, you can perform advanced asynchronous and real-time messaging, such as queueing and pub/sub, with fully hosted and managed cloud message queues and exchanges.
We’ve seen how we can use Anypoint MQ to handle error messages through a source, error, and dead-letter queues pattern during our integrations. With MuleSoft, we can extend Anypoint MQ’s capabilities by implementing ad-hoc solutions like the Anypoint MQ REM dashboard that extends your enterprise business by adopting new capabilities at no additional cost.