Contact Us 1-800-596-4880

Configuring Cross-Region Failover for Standard Queues

Anypoint Connector for Anypoint MQ (Anypoint MQ Connector) for Mule 4 version 4.0.7 provides failover capability for standard queues.

When you enable failover for a queue, Anypoint MQ automatically creates a fallback queue in a fallback region. If a Mule app can’t reach an Anypoint MQ server in a region, it switches to the fallback queue to publish and consume messages. For information about situations that can cause a region to be considered unavailable, see Region Unavailability.

This feature provides resiliency by switching to a fallback queue in a fallback region when the primary region is down. It doesn’t provide data redundancy by replicating messages across the primary and fallback queues.

When the connector detects that the primary region is down, it:

  • Switches to the fallback queue to publish and consume new messages.

  • Periodically checks if the primary region is back up.

    When the connector detects that it can communicate with the primary region, it switches processing back to the primary queue. The consumer continues to read from the fallback queue until all messages in that queue are processed.

The fallback queue inherits the settings of the primary queue, such as message TTL (time-to-live) and default acknowledgment timeout. The Anypoint MQ server manages fallback queues and regions; end users can’t configure them.

You can disable failover, but you can’t delete the fallback queue. When you disable failover for a queue, apps can still consume any messages that remain in the fallback queue but can’t publish new messages to it.

Failover Limitations and Considerations

  • Failover Support

    • This feature is not enabled by default.

      For information about enabling this feature in your app, see Enable Failover in Your App.

    • Failover support requires Anypoint MQ Connector 4.0.7 or later.

    • Failover is supported for standard queues only.

    • Failover isn’t supported for message exchanges or FIFO queues.

  • Fallback Regions

    • Because MuleSoft Government Cloud includes only one region, it does not support failover.

    • Anypoint MQ is available in only one region in some countries.

      If failover is enabled for queues in those regions and the primary region goes down, data resides in a region outside the country until the primary region is available.

    For the list of fallback regions, see Primary-Fallback Regions.

  • Authentication

    If access management is unavailable when the connector switches to the fallback region, the connector might not be able to switch to the fallback region if it can’t validate the access token.

  • Anypoint MQ UI

    The Message Sender and Message Browser in the Anypoint MQ UI don’t support the failover feature.

    When you send a message using the Message Sender, the message is published to the specified queue and appears in the Message Browser. However, if the primary region is down, the message is not forwarded to the fallback queue, so it doesn’t appear in the Message Browser for the fallback queue.

  • Performance and Billing

    The Consumer and Subscriber operations in Anypoint MQ Connector periodically check the fallback queue for new messages. Each request counts against your monthly API request quota. These checks can also cause latency.

    Publishing to or consuming from the fallback queue might be slower than with the primary queue due to the checks and the expected network latency of processing from a queue in a different region.

    You can configure how frequently the connector checks the fallback queue. See Configure the Frequency of Fallback Queue Checks.

Before You Begin

To use failover, you must first:

Enable Failover for a New or Existing Queue

Enabling cross-region failover creates a fallback queue in a fallback region.

If either the primary or fallback region is unavailable, enabling failover via the Anypoint MQ UI or REST API might not work.

If the primary queue has an assigned dead-letter queue (DLQ), you must enable failover for the DLQ before enabling failover for the primary queue.

To enable failover for a new or existing queue:

  1. Sign in to Anypoint Platform and click MQ in the navigation menu.

  2. Click Destinations.

  3. Create a queue or modify an existing queue:

    • Create a queue

    • Modify an existing queue

    1. Click the Add icon to display the menu:

      Destinations page showing the Add icon for adding a queue
    2. Select Queue.

      Anypoint MQ supports failover for standard queues only.

    3. Complete the fields in Create Queue.

      For information about queue settings, see Create a Queue.

    4. Select Enable Cross-Region Failover:

      Create Queue dialog box showing the failover option selected
    5. Click Create Queue.

      Anypoint MQ creates the queue and also creates a fallback queue in the fallback region. The name of the fallback queue is the primary queue name with the _fb suffix. For example, if the primary queue name is myDemoQueue, the fallback queue name is myDemoQueue_fb.

      The Anypoint MQ server manages fallback queues and regions; end users can’t configure them.

    1. Click the queue name.

      Anypoint MQ supports failover for standard queues only.

    2. In the Queue Settings page, select Enable Cross-Region Failover:

      Queue Settings page showing the failover option selected
    3. Click Save Changes.

      Anypoint MQ updates the queue settings and creates a fallback queue in the fallback region. The name of the fallback queue is the primary queue name with the _fb suffix. For example, if the primary queue name is myDemoQueue, the fallback queue name is myDemoQueue_fb.

      The Anypoint MQ server manages fallback queues and regions; end users can’t configure them.

      If you previously enabled failover for the queue, the fallback queue already exists and is reinstated.

    4. Restart all applications consuming from or publishing to the queue.

View Fallback Queue Details

To view failover configuration for the primary and fallback queues, display the queue details:

  1. Sign in to Anypoint Platform and click MQ in the navigation menu.

  2. Click Destinations.

  3. Click the queue type to display its details, including the failover configuration.

    • The queue details pane for the primary queue includes the fallback queue:

      Details pane for the primary queue showing the fallback queue and region
      1 Queue type displays the queue details pane for the primary queue.
      2 The name of the fallback queue is the primary queue name with the _fb suffix.
    • The queue details pane for the fallback queue includes the primary queue:

      Details pane for the fallback queue showing the primary queue and region
      1 Queue type displays the queue details pane for the fallback queue.

      The fallback queue can’t be deleted.

      2 The name of the primary queue is the fallback queue name without the _fb suffix.

Disable Failover for a Queue

When you disable failover for a queue, apps can still consume any messages that remain in the queue but can’t send new messages to the queue.

When you disable failover for a queue, you must restart all applications that consume from or send to the queue.

When you re-enable failover, Anypoint MQ reinstates the same fallback queue.

To process any messages that remain in the fallback queue after disabling failover, see Process Messages Directly from the Fallback Queue.

To disable failover for a queue:

  1. Sign in to Anypoint Platform and click MQ in the navigation menu.

  2. Click Destinations.

  3. Click the queue name.

  4. In the Queue Settings page, deselect Enable Cross-Region Failover

    Anypoint MQ disables failover for the queue:

    Queue Settings page showing the failover option deselected
  5. Click Save Changes.

    The primary queue details shows that failover is disabled:

    Details pane for the primary queue showing the fallback queue and failover status
  6. Restart all applications consuming from or publishing to the queue.

Primary-Fallback Regions

Location Primary Region Name Primary Region Fallback Region Name Fallback Region

US Control Plane

North America

US East (N. Virginia)

us-east-1

US East (Ohio)

us-east-2

US East (Ohio)

us-east-2

US West (Oregon)

us-west-2

US West (Oregon)**

us-west-2

Canada (Central)

ca-central-1

Canada (Central)*

ca-central-1

US East (N. Virginia)

us-east-1

Europe

Europe (Ireland)**

eu-west-1

Europe (London)

eu-west-2

Europe (London)**

eu-west-2

Europe (Ireland)

eu-west-1

APAC

Asia Pacific (Singapore)**

ap-southeast-1

Asia Pacific (Tokyo)

ap-northeast-1

Asia Pacific (Sydney)*

ap-southeast-2

Asia Pacific (Singapore)

ap-southeast-1

Asia Pacific (Tokyo)**

ap-northeast-1

Asia Pacific (Sydney)

ap-southeast-2

EU Control Plane

Europe

Europe (Frankfurt)**

eu-central-1

Europe (Ireland)

eu-west-1

Europe (Ireland)**

eu-west-1

Europe (Frankfurt)

eu-central-1

* Because Anypoint MQ is available in only one region in this country, the fallback region is not in the same country as the primary region.

** The fallback region for this region is not in the same country as the primary region.

Region Unavailability

The connector considers a region as unavailable in cases where the Anypoint MQ backend server is:

  • Down, resulting in HTTP 5xx (Server Error) status codes to the connector.

  • Up, but is slow or unresponsive.

    For example, the connector receives Timeout errors while making REST API calls to the backend server.

  • Available in some situations, but not others.

    For example, unresponsive for queues, but available for other usage, such as message exchanges.

When the connector receives an HTTP 5xx or any server-side error, it temporarily marks the region as down for the specific queue and switches to the fallback queue.

The connector periodically checks for new messages in the primary queue to determine if the primary region is back up. You can change the frequency of these checks. For information, see Configure the Frequency of Fallback Queue Checks.