Anypoint MQ allows applications to communicate by publishing messages to queues. This document describes how to create queues and exchanges, send messages to a queue, and retrieve messages from a queue using Anypoint Platform. Key steps include logging into Anypoint Platform, clicking MQ, clicking Destinations, clicking the blue plus circle to create a new queue or exchange, specifying configuration details, and then sending or receiving messages. Organization administrators can also view Anypoint MQ usage statistics.
2. • Anypoint MQ is a messaging broker that lets applications communicate by
publishing a Mule Message to a queue so that another application can
consume the message.
• This guide describes how to create a queue, exchange, and client
application using Anypoint Platform.
• Note: Queue and exchange names can contain alphanumeric characters (a-
z, A-Z, 0-9), dots (.), and dashes (-). All other characters are not allowed.
Queue and exchange names are limited to 128 characters in length.
3. • Organization administrators or owners can view the current and past
months usage - the total number of messages and API requests. This
information is accessed from the Access Management page. For more
information, see Anypoint MQ Usage Information.
4. Create a Queue
• A queue is a temporary storage area for a message.
• To create a queue:
• Log into Anypoint Platform.
• Click MQ from the left navigation bar or click MQ from the main
Anypoint Platform screen:
7. • Click the blue plus circle.
• Click Queue.
• In the Create Queue screen:
8.
9. • Specify a name.
• (Optional) Change the time-to-live (TTL) durations for:
• Default Message TTL - How long unprocessed messages persist before being
deleted.
• Default Lock TTL - If there is a server failure and a message is not acknowledged,
specifies the duration that a message would wait before being put back into the
queue. A locked message does not block other messages to be read. The lock
makes a message unavailable to other applications while locked.
• The duration for each TTL can be from milliseconds up to 14 days.
• (Optional) Set the queue to encrypted. Anypoint MQ uses PBE with MD5 and
triple DES to encrypt messages.
• Click Save Changes.
11. • The next section describes how Anypoint Platform lets you send
messages to a queue and view, return the messages to the queue, or
delete the messages. Message content (called a payload) can be text,
JSON, or CSV (comma-separated values).
12. Send a Message to a Queue
• To send a message to a queue:
• Log into Anypoint Platform.
• In the top task bar, click MQ.
• Click Destinations.
• Click the queue entry in Destinations to view details about the queue.
• Click the queue name in the details to open the Messaging feature:
13.
14. Verify the Message in a Queue
• To verify that the message arrived in the queue, either return to the
Destinations screen to observe the number of messages in the queue,
or you can assume the message is in the queue, and you can Get a
Message From a Queue.
• To return to the Destinations screen to verify that the message is in
the queue:
15.
16. Get a Message From a Queue
• To get a message from a queue:
• Follow the directions in Send a Message to a Queue and advance to
Step 6, except click Message Browser:
• Click Get Messages.
• Click the message ID value to view the message.
17. • If you want to return the message to the queue, such as if other
applications may also want to read the message, click the Return
Messages icon - this is the default condition. If you switch screens
back to the Message Sender or to Destinations, messages
automatically return to the queue. In Anypoint MQ, returning the
messages to the queue is known as nack - the message is not altered.
However, the time to live (TTL) value you set when you created your
queue determines how long the message is available before Anypoint
MQ deletes it.
18. • Alternatively, you can delete the message by clicking the trash can
icon. In Anypoint MQ, deleting a message is called an ack - For
information on how Anypoint MQ processes ack messages for you,
see Acknowledgement Mode.
• Organization administrators or owners can view the current and past
months usage - the total number of messages and API requests. This
information is accessed from the Access Management page. For more
information, see Anypoint MQ Usage Information.
• In the next section, you can try alternate ways of formatting
messages.