3.x
Upgrading and Migrating Anypoint MQ Connector
To use the latest features, upgrade Anypoint Connector for Anypoint MQ (Anypoint MQ Connector) from version 3.x to version 4.x.
Changes in This Release
Some changes included in version 4.x break backward compatibility with version 3.x.
Anypoint MQ Connector 4.x includes support for these features:
-
Cross-Region Failover
Anypoint MQ Connector for Mule 4 version 4.0.7 and later provides failover capability for standard queues.
When enabled, if a Mule app can’t reach an Anypoint MQ server in a region, the connector switches to the fallback queue in the fallback region to publish and consume messages.
For information, see:
-
Connected Apps
Anypoint MQ Connector for Mule 4 version 4.0.1 and later includes a new format for the URL field in the Global Element Properties page.
-
In Anypoint MQ Connector 3.x, the URL format was:
https://mq-us-east-1.anypoint.mulesoft.com/api/v1
-
In Anypoint MQ Connector 4.x, the URL format includes
{orgID}
and{envID}
. For example:https://mq-us-east-1.anypoint.mulesoft.com/api/v1/organizations/{orgID}/environments/{envID}
If you configure the connector with the wrong version of the URL, Anypoint MQ returns the following error:
Invalid api url provided
-
To use the failover feature, see Configuring Cross-Region Failover in Your App.
Upgrade Prerequisites
Before you perform the upgrade, create a backup of your files, data, and configurations in case you need to revert to the previous version.
Upgrade Steps
To upgrade to Anypoint MQ Connector 4.x:
-
In Anypoint MQ, in the Destinations page, click Copy and select Connector version 4.x and later from the menu:
-
In Anypoint Studio, open the Mule project.
-
In the Mule Palette view, click Search in Exchange.
-
In Add Dependencies to Project, type
Anypoint MQ
in the search field. -
In Available modules, select Anypoint MQ Connector - Mule 4 and then click Add.
-
Click Finish.
Anypoint Studio upgrades the connector automatically.
-
Verify that the
mq-connector
dependency version is4.0.5
or later in thepom.xml
file:<dependency> <groupId>com.mulesoft.connectors</groupId> <artifactId>anypoint-mq-connector</artifactId> <version>4.0.5</version> <classifier>mule-plugin</classifier> </dependency>
-
In Anypoint Studio, in the Anypoint MQ Config window, paste the URL in the URL field:
-
Depending on your authentication method, complete the Client App ID and Client Secret fields:
-
Connected App:
Paste the values of ID and Secret from Anypoint Platform > Access Management > Connected Apps.
For information about configuring Connected Apps in Anypoint MQ, see Configuring Connected Apps.
-
Client App:
Paste the values of Client App ID and Client Secret from Anypoint Platform > MQ > Client Apps.
For information about configuring Client Apps in Anypoint MQ, see Configuring Client Apps.
-
Post Upgrade Steps
After you install the latest version of the connector, follow these steps to complete the upgrade:
-
In Anypoint Studio, verify that there are no errors in the Problems or Console views.
-
Check the project pom.xml and verify that there are no problems.
-
Test the connection and verify that the operations work.