---
schema_version: "1"
id: acd341df69c47650037d371335a1af53bbed00a972f27c8935fbec8d5d328900
title: Anypoint MQ Overview
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/mq/index.md
canonical_url: https://docs.mulesoft.com/mq/
source_site: docs.mulesoft.com
content_type: documentation
content_hash: fd093772064fe71cf6d675ab8ec88ecfda74d452ca942be662aa90c00d234c16
description: MuleSoft Documentation Site
latest: true
---
---
product: MQ
---

# Anypoint MQ Overview

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Anypoint MQ is a multi-tenant, cloud-based message queuing service for exchanging data
asynchronously between your applications. The Anypoint MQ messaging broker enables applications to
communicate by publishing a Mule message to a queue so that another app can consume the message.

Anypoint MQ is fully integrated with Anypoint Platform, offering access control, client management,
and connectors. Integration with Access Management enables you to specify environments and business
groups for role-based access control and support for connected apps.

Anypoint MQ supports hybrid use cases and IoT (Internet of Things), in which you collect data from
different devices. Anypoint MQ also provides a REST API for device applications. You can also use
Anypoint MQ with other app frameworks such as node.js to communicate with queues.

This spotlight video gives an overview of Anypoint MQ:

![](https://play.vidyard.com/9vARbkYLk5ZqYsrs6fgmvg.jpg)

Anypoint MQ:

- Provides fully hosted and managed [queues](https://docs.mulesoft.com/mq/mq-queues) and [message exchanges](https://docs.mulesoft.com/mq/mq-exchanges) in the
  cloud.

- Supports large payloads, encryption, queuing, and publish/subscribe (pub/sub) paradigms.

- Enables you to easily connect to non-Mule applications by using the REST API.

- Provides Anypoint Studio access, which makes the process of leveraging your queues and message
  exchanges as simple as drag, drop, and configure.

## Before You Begin Using Anypoint MQ

1.  Make sure you have a paid Anypoint Platform package or subscription with the Anypoint MQ
    integration add-on.

    Anypoint MQ isn’t available in the trial edition of Anypoint Platform.

    To add Anypoint MQ to your package or subscription, contact your account team. After purchasing
    Anypoint MQ, wait one hour for Anypoint MQ to become available in Anypoint Platform.

    For information about Anypoint Integration packages, see
    [MuleSoft Anypoint Platform Pricing](https://www.mulesoft.com/anypoint-pricing).

2.  Set up your environment and permissions.

    For information, see [Set Up the Environment and Access Permissions](https://docs.mulesoft.com/mq/mq-access-management).

3.  Review this overview for information about Anypoint MQ.

## Anypoint MQ Features

Anypoint MQ includes these features:

Queues and Message Exchanges

Send messages to queues and pull messages from queues. Use a message exchange to send messages to
multiple standard or FIFO queues simultaneously or route messages to specific queues by using
intelligent message routing rules.

For information, see:

- [Queues and Message Exchanges](#queues-and-exchanges)

- [Configuring and Using Queues](https://docs.mulesoft.com/mq/mq-queues)

- [Sending Messages to Multiple Queues Using Message Exchanges](https://docs.mulesoft.com/mq/mq-exchanges)

- [Route Messages by Configuring Rules on Message Exchanges](https://docs.mulesoft.com/mq/mq-routing-rules)

Management Console

Monitor queue statistics, purge queues, and see how many messages are in flight by using the
management console.

Anypoint MQ Connector

Send and receive messages from any Mule app, whether it’s deployed in CloudHub or used in a hybrid
scenario and deployed on-premises.

For information, see [Anypoint MQ Connectors](https://docs.mulesoft.com/mq/mq-connectors).

Usage Information

View the current and past months' usage, including the total number of messages and API requests.
Organization administrators and owners access this information from the **Access Management** page.

For information, see [Viewing Anypoint MQ Usage Data](https://docs.mulesoft.com/mq/mq-usage).

REST API

Use the REST API to easily communicate with non-Mule applications.

For information, see [Anypoint MQ REST APIs](https://docs.mulesoft.com/mq/mq-apis).

Environments and Role-Based Access Control

Use Anypoint Platform access management to specify different environments for your queues, who can
access each environment, and what they can do within each environment.

For information, see [Set Up the Environment and Access Permissions](https://docs.mulesoft.com/mq/mq-access-management).

Client Management

Use connected apps to authenticate with Anypoint Platform by using APIs.

Register each consumer registered as a connected app with a name, ID, and secret. The connected app
uses the ID and secret to authenticate and get access to queues and message exchanges within a
single environment. You can’t use connected apps across multiple environments or business groups.

For information, see [Configuring Connected Apps](https://docs.mulesoft.com/mq/mq-connected-apps).

Large Payloads

Send large payloads of up to 10 MB.

If the payload contains any format except text (such as CSV, HTML, JSON, and XML), Anypoint MQ
converts it to a string before sending, which increases the payload size. This conversion might
result in the payload exceeding the maximum payload size of 10 MB and causing a `Payload too large`
error.

Disaster Recovery

Ensure your messages are delivered even if services go down temporarily.

Within each region, Anypoint MQ services deploy to multiple availability zones (AZs) to provide high
availability (HA). If service in one availability zone goes down, the Anypoint MQ service operates
normally in that region. If all availability zones go down in a region, the Anypoint MQ service is
unavailable in that region until at least one of the availability zones comes back up. Messages that
were already in the Anypoint MQ system before service was interrupted are retained.

You can enable failover on standard queues, which creates a fallback queue in a fallback region.
With failover enabled, if an app that uses Anypoint MQ Connector can’t contact the Anypoint MQ
server in a region, the connector switches to the fallback queue to continue publishing and
consuming messages. For information, see
[Configuring Cross-Region Failover for Standard Queues](https://docs.mulesoft.com/mq/mq-failover).

Usage Statistics

View usage reports to manage peak usage and subscription parameters. Reports provide current and
past usage, including consumed data, API requests, and the total number of messages received.

For information, see [Viewing Anypoint MQ Usage Data](https://docs.mulesoft.com/mq/mq-usage).

You can also use the Anypoint MQ Stats API to perform statistical analysis of queue performance.

For information, see [Anypoint MQ Stats API](https://docs.mulesoft.com/mq/mq-apis#mq-stats-api).

> [!NOTE] You can’t use Anypoint MQ with CloudHub Insight or Anypoint Monitoring.

## Queues and Message Exchanges

_Message queues_ provide temporary storage that enables applications to communicate in a scalable
and reliable way. Publishers can publish messages into queues, and subscribers can receive messages
from queues.

![A publisher sends a message to a queue, and a subscriber reads messages from a queue](/mulesoft/current/en-us/mq/_images/mq-pub-q-sub.png)

To distribute messages to multiple queues and consumers, bind multiple queues to a _message
exchange_. By default, messages sent to an exchange appear in all of its bound queues
simultaneously. When you configure message routing rules, a message appears only in queues whose
binding has no rule or has a rule that the message matches. For details, including what happens when
no rule matches, see [Route Messages by Configuring Rules on Message Exchanges](https://docs.mulesoft.com/mq/mq-routing-rules).

![A publisher sends messages to an Exchange, which then directs messages to queues, from which consumers retrieve them](/mulesoft/current/en-us/mq/_images/mq-pub-ex-sub.png)

For example, if a publisher publishes changes in the weather and multiple apps must receive that
data, use a message exchange to publish a single message to multiple queues for each app.

A _binding_ is a relationship between the queue and message exchange that tells the message exchange
where to send messages. By configuring _intelligent message-routing rules_ on a binding, you can
route messages to specific queues that are bound to the message exchange.

- You can bind a queue to multiple message exchanges.

- You can bind a maximum of 450 queues to a message exchange.

- You can bind a maximum of 25 queues to an exchange with message routing rules defined. If an
  exchange has more than 25 queue bindings, you can’t use intelligent message routing.

In this example, an app running Salesforce customer relationship manager (CRM) uses Anypoint MQ to
communicate with two applications that handle different databases:

![A CRM system communicates customer updates through a message exchange, which then relays the information to separate queues for a database and SAP](/mulesoft/current/en-us/mq/_images/mq-crm-to-dbs.png)

The Salesforce app sends a pub/sub message to an Anypoint MQ message exchange (`customer-updates`).
The two applications (`customer-consumer-1` and `customer-consumer-2`) receive the message from the
message exchange and send it to their respective databases.

### Benefits of Queues

Queues provide these benefits:

- Horizontal scalability

  By putting a message in a queue, the work to process that message can be distributed over multiple
  subscribers.

- Reliability

  Queues ensure that messages are always processed, even in the case of failure.

  Anypoint MQ provides reliability with queues by using a lock and acknowledge mechanism. These
  features ensure that a message is always processed, even in the case of failure.

- Decoupling

  You can use a queue as a communication mechanism between different applications and devices,
  enabling them to have different development life cycles or maintenance windows without affecting
  other applications.

- Aggregation

  Multiple message producers can publish to a single queue, which enables easy consumption by
  consumers.

  The message-consumption process is:

  1.  A consumer retrieves messages from a queue, which locks the messages and makes the messages
      invisible to all other consumers.

  2.  When retrieving, the consumer specifies a lock timeout. If the message is not processed within
      the specified window, Anypoint MQ makes the message visible to other consumers. If a failure
      occurs, such as a consumer node crash, another node can process the message. A locked message
      does not block other messages from being read.

      - If a consumer processes a message successfully, the client acknowledges the message, and
        Anypoint MQ removes the message from the queue.

      - If a consumer can’t process a message, the message proceeds with a negative acknowledgment
        and becomes visible in the queue again.

      For information, see
      [ACK and NACK Operations](https://docs.mulesoft.com/anypoint-mq-connector/latest/anypoint-mq-ack).

- Unlimited messages in a queue

  Anypoint MQ doesn’t limit the number of messages in a queue. The size of each message in a queue
  is limited to 10 MB.

- Long polling

  Messages are read through long polling. The server holds a request open until new data is
  available, and then Anypoint MQ delivers a batch of messages with a single read.

- Billing and charging

  Billing is based on the number of messages delivered to subscribers from queues, rather than the
  number of queues or message exchanges you create.

## Anypoint MQ Features by Control Plane

<table><colgroup><col> <col> <col> <col></colgroup><thead><tr><th>Anypoint MQ Feature</th><th>US Cloud and EU Cloud</th><th>Canada Cloud, Japan Cloud, India Cloud, Australia Cloud, United Kingdom Cloud</th><th>MuleSoft Government Cloud</th></tr></thead><tbody><tr><td><div><div><p></p></div><div><ul><li><p><a href="https://docs.mulesoft.com/mq/mq-queues">Encrypted Queues</a></p></li><li><p><a href="https://docs.mulesoft.com/mq/mq-exchanges">Message Exchanges</a></p></li><li><p><a href="https://docs.mulesoft.com/mq/mq-routing-rules">Message Routing</a></p></li><li><p><a href="https://docs.mulesoft.com/mq/mq-connected-apps">Connected Apps</a></p></li><li><p><a href="https://docs.mulesoft.com/mq/mq-connectors">Anypoint MQ Connector versions 4.x and later</a></p></li><li><p><a href="https://docs.mulesoft.com/mq/mq-apis#mq-admin-api">Anypoint MQ Admin API</a></p></li><li><p><a href="https://docs.mulesoft.com/mq/mq-apis#mq-broker-api">Anypoint MQ Broker API</a></p></li><li><p><a href="https://docs.mulesoft.com/mq/mq-apis#mq-stats-api">Anypoint MQ Stats API</a> (Anypoint MQ Stats only)</p></li></ul></div></div></td><td><div><div><p>Yes</p></div></div></td><td><div><div><p>Yes</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p></p></div><div><ul><li><p><a href="https://docs.mulesoft.com/mq/mq-queues">Unencrypted Queues</a></p></li><li><p><a href="https://docs.mulesoft.com/mq/mq-failover">Cross-Region Failover</a></p></li><li><p><a href="https://docs.mulesoft.com/mq/mq-client-apps">Client Apps</a></p></li><li><p><a href="https://docs.mulesoft.com/mq/mq-connectors">Anypoint MQ Connector earlier than 4.x</a></p></li></ul></div></div></td><td><div><div><p>Yes</p></div></div></td><td><div><div><p>No</p></div></div></td><td><div><div><p>No</p></div></div></td></tr><tr><td><div><div><p></p></div><div><ul><li><p><a href="https://docs.mulesoft.com/cloudhub/deploying-to-cloudhub">CloudHub 1.0 Deployments</a></p></li></ul></div></div></td><td><div><div><p>Yes</p></div></div></td><td><div><div><p>No</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr><tr><td><div><div><p></p></div><div><ul><li><p><a href="https://docs.mulesoft.com/mq/mq-usage#access-mq-usage-reports">Usage Reports</a> (Usage)</p></li></ul></div></div></td><td><div><div><p>Yes</p></div></div></td><td><div><div><p>Yes</p></div></div></td><td><div><div><p>No</p></div></div></td></tr></tbody></table>

### Limitations by Control Plane

All Anypoint MQ features are supported on
[MuleSoft Government Cloud](https://gov.anypoint.mulesoft.com/login/),
[Canada Cloud](https://ca1.platform.mulesoft.com), [Japan Cloud](https://jp1.platform.mulesoft.com),
[India Cloud](https://in1.platform.mulesoft.com),
[Australia Cloud](https://au1.platform.mulesoft.com), and
[United Kingdom Cloud](https://gb1.platform.mulesoft.com) with the following exceptions:

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Limitation</th><th>MuleSoft Government Cloud</th><th>Canada Cloud, Japan Cloud, India Cloud, Australia Cloud, United Kingdom Cloud</th></tr></thead><tbody><tr><td><div><div><p><strong><a href="https://docs.mulesoft.com/mq/mq-queues">Unencrypted Queues</a></strong></p></div></div></td><td><div><div><p>Not supported. When <a href="https://docs.mulesoft.com/mq/mq-queues#create-a-queue">creating a queue</a>, <strong>Encryption</strong> defaults to selected.</p></div></div></td><td><div><div><p>Not supported. When <a href="https://docs.mulesoft.com/mq/mq-queues#create-a-queue">creating a queue</a>, <strong>Encryption</strong> defaults to enabled.</p></div></div></td></tr><tr><td><div><div><p><strong><a href="https://docs.mulesoft.com/cloudhub/deploying-to-cloudhub">CloudHub 1.0 Deployments</a></strong></p></div></div></td><td><div><div><p>Supported</p></div></div></td><td><div><div><p>Not supported. Deploy apps to CloudHub 2.0 shared spaces or Anypoint Runtime Fabric.</p></div></div></td></tr><tr><td><div><div><p><strong><a href="https://docs.mulesoft.com/mq/mq-client-apps">Client Apps</a></strong></p></div></div></td><td><div><div><p>Not supported. Use <a href="https://docs.mulesoft.com/mq/mq-connected-apps">connected apps</a> instead.</p></div></div></td><td><div><div><p>Not supported. Use <a href="https://docs.mulesoft.com/mq/mq-connected-apps">connected apps</a> instead.</p></div></div></td></tr><tr><td><div><div><p><strong><a href="https://docs.mulesoft.com/mq/mq-connectors">Anypoint MQ Connector earlier than 4.x</a></strong></p></div></div></td><td><div><div><p>Not supported. Requires <a href="https://docs.mulesoft.com/anypoint-mq-connector/latest/">Anypoint MQ Connector 4.x for Mule 4</a>.</p></div></div></td><td><div><div><p>Not supported. Requires <a href="https://docs.mulesoft.com/anypoint-mq-connector/latest/">Anypoint MQ Connector 4.x for Mule 4</a>.</p></div></div></td></tr><tr><td><div><div><p><strong><a href="https://docs.mulesoft.com/mq/mq-failover">Cross-Region Failover</a></strong></p></div></div></td><td><div><div><p>Not supported</p></div></div></td><td><div><div><p>Not supported</p></div></div></td></tr></tbody></table>

For information about the regions where Anypoint MQ is available, see
[Anypoint MQ Regions](https://docs.mulesoft.com/mq/mq-faq#mq-regions).

For information about MuleSoft Government Cloud, see [Government Cloud Overview](https://docs.mulesoft.com/gov-cloud/).

For information about Anypoint Platform on other control planes, see
[Salesforce Hyperforce Overview](https://docs.mulesoft.com/hyperforce/).

## See Also

- [Salesforce Hyperforce Overview](https://docs.mulesoft.com/hyperforce/)

- [Anypoint MQ Glossary](https://docs.mulesoft.com/mq/mq-glossary)

- [Anypoint MQ Connectors](https://docs.mulesoft.com/mq/mq-connectors)

- [FAQ: Anypoint MQ](https://docs.mulesoft.com/mq/mq-faq)

- [Anypoint MQ Release Notes](https://docs.mulesoft.com/mq/mq-release-notes)

- [Anypoint MQ Audit Logging](https://docs.mulesoft.com/access-management/audit-logging#to-query-audit-logging-for-anypoint-mq)
