Getting started Community Training Tutorials Documentation APIs, AI & Tools
4.x
Upgrade Anypoint Connector for Apache Cassandra (Apache Cassandra Connector) from version 4.x to version 5.x.
This connector now supports Apache Cassandra 5.x. The connector now uses DataStax Java Driver 4.17.0.
The Cassandra Cluster Name field is removed from Studio. It no longer appears on the General or Advanced Settings tab. Applications that still set clusterName on cassandra-db:connection fail to deploy. Delete the attribute. Contact points and Cassandra Cluster Nodes still select the cluster.
The new Local Datacenter field is on the Advanced Settings tab. It sets the local datacenter for the driver’s load-balancing policy. Set this field when contact points don’t share one datacenter, such as in a multi-DC cluster. You can omit it for single-DC clusters.
The new Request Timeout (ms) field is on the Advanced Settings tab. It sets the per-request timeout for CQL operations. The default is 12000 milliseconds, which preserves the 12-second deadline from version 4.1.
On Apache Cassandra 5.x, the Change Column Type operation fails because Cassandra no longer supports altering column types. Add a new column, backfill the data, then drop the old column.
TLS configuration now applies to the driver. The default Endpoint identification algorithm is DISABLED. If your XML still sets HTTPS or LDAPS, version 5.0 validates the server certificate against the host.
Don’t select native protocol V1 or V2. Those values fail at application initialization. Leave Protocol Version unset to let the driver negotiate, including native protocol V5 on Apache Cassandra 5.x.
These libraries are upgraded to address reported security vulnerabilities:
The jackson-core and jackson-databind libraries are upgraded to version 2.22.2.
The netty-codec library is upgraded to version 4.2.0.Final.
The netty-handler library is upgraded to version 4.1.137.Final.
The guava library is upgraded to version 32.1.3-jre.
The jnr-posix library is upgraded to version 3.2.2.
The commons-lang3 library is upgraded to version 3.20.0.
The commons-collections4 library is upgraded to version 4.6.0.
Ensure your system meets the following compatibility requirements before you perform the upgrade:
| Application/Service | Version |
|---|---|
Mule runtime |
4.6.0 and later |
Java |
8, 11, and 17 |
Apache Cassandra |
5.x |
DataStax Java Driver |
4.17.0 |
Mule versions 4.1 through 4.5 aren’t supported. Applications on these versions must remain on Apache Cassandra Connector 4.1.x.
Before you perform the upgrade, you must:
Create a backup of your files, data, and configuration in case you need to restore to the previous version.
Ensure that your environment meets the version 5.x requirements, including Mule 4.6.0 or later.
Delete clusterName from every cassandra-db:connection element. If the attribute remains, the app fails to deploy.
Set Local Datacenter on the Advanced Settings tab when the cluster is multi-DC or contact points don’t share one datacenter.
Review tls:context. The default hostname validation is DISABLED. If XML still has HTTPS or LDAPS, version 5.0 validates the certificate against the host.
Leave Protocol Version unset, or select V3 or V4. Don’t select V1 or V2.
Follow these steps to perform the upgrade from Apache Cassandra Connector 4.x to Apache Cassandra Connector 5.x:
In Anypoint Studio, create a Mule project.
In the Mule Palette view, click Search in Exchange.
In the Add Dependencies to Project window, enter cassandra in the search field.
In the Available modules section, select Cassandra and click Add.
Click Finish.
Verify that the Cassandra Connector dependency version is 5.x.x in the pom.xml file, where x.x is the minor release and patch version number. For example, if you are upgrading to v5.0, the dependency version in the pom.xml file should be 5.0.0.
Studio upgrades the connector automatically.
After you install the latest version of the connector, follow these steps to verify the upgrade:
In Studio, verify that there are no errors in the Problems or Console views.
Check the project pom.xml file and verify that there are no problems.
Test the connection and verify that the operations work.
If the app fails to deploy, check cassandra-db:connection for a clusterName attribute and delete it.
If the app fails to deploy with an InitialisationException that native protocol V1 or V2 is no longer supported, leave Protocol Version unset, or select V3 or V4.
If the connection fails against a multi-DC cluster, set Local Datacenter on the Advanced Settings tab to the datacenter that contains your contact points.
If Change Column Type fails with Altering column types is no longer supported, you are connected to Apache Cassandra 5.x. Add a new column, backfill the data, then drop the old column.
If the TLS handshake fails, the certificate might not match the host. Set Endpoint identification algorithm to DISABLED, or update the server certificate.