To Install and Configure the Cassandra Connector

The Cassandra connector is shared in Exchange. You install the Cassandra connector in Anypoint Studio.

  1. Launch Anypoint Studio.

  2. Click Open Exchange Open Exchange.

  3. Find the connector, and install it using the wizard.

To Configure the Cassandra Connector Global Elements

  1. Click Global Elements > Create.

  2. In Choose Global Type, use the filter to locate and select CassandraDB: Username/Password Connection.

  3. In Global Element Properties for Cassandra, configure the following parameters:

    Parameter Description


    Enter a name for the configuration so it can be referenced later by the config-ref parameter in the flow.


    Enter a Cassandra user name if you enabled PasswordAuthenticator in the Cassandra yaml. If AllowAllAuthenticator is enabled, leave this value blank.


    Enter the password if you enabled PasswordAuthenticator; otherwise, leave this value blank.


    Enter a host name, or IP address, of a Cassandra node.


    Enter a port number. The default port is 9042.


    Enter the Cassandra keyspace. A keyspace groups column families.

  4. Optionally, click Pooling Profile. Configure any settings relevant to managing multiple connections using a connection pool.

  5. Optionally, click Reconnection. Configure any settings relevant to reconnection strategies that Mule should execute if it loses its connection to Cassandra.

  6. Save the global connector configurations.

To Configure a Connection to a Cassandra Cluster

  1. Click Advanced Configuration.

  2. In Cluster Name, enter the Cassandra cluster name.

  3. In Protocol Version, enter the version of the native protocol supported by the driver:

    • V1 ("1.2.0")

    • V2 ("2.0.0")

    • V3 ("2.1.0")

    • V4 ("2.2.0")

  4. In Max Schema Agreement Wait Seconds, enter the maximum time to wait for schema agreement before returning from a DDL query.

  5. In Compression, select the compression to use for the transport:

    • NONE

    • SNAPPY

    • LZ4

  6. In SSL, enable or disable the use of SSL for the cluster.

To Configure Cassandra Connector Properties in Studio

  1. Drag the Cassandra connector from the Mule palette onto the canvas, then select it to open the Properties Editor console.

  2. Configure these connector parameters:

    • Display Name

      Enter a unique label for the connector in your application. Default = Cassandra DB

    • Connector Configuration

      Connect to a global element linked to this connector. Global elements encapsulate reusable data about the connection to the target resource or service. Select the global Cassandra connector element that you just created.

    • Operation

      Select the database operation to perform.

To Configure Cassandra Connector Properties in the XML Editor

  1. Include the Cassandra namespaces in your Mule configuration file:

    <mule xmlns:cassandradb=""
          <!-- Your flows and configuration elements -->
  2. Create a global Cassandra configuration outside and above your flows. For example, in an app that defines parameters in, enclose parameter keys in curly brackets:

  3. Build your application flow and add a Cassandra connector using one of the connector database operations:


    Creates a new keyspace.


    Drops the entire keyspace.


    Creates a table in a specific keyspace


    Drops an entire table from the specified keyspace


    Returns all the table names from the specified keyspace.


    Executes the raw input query provided.


    Executes the insert entity operation.


    Executes the update entity operation.


    Deletes values from an object specified by the where clause.


    Deletes an entire record.


    Executes a select query.


    Changes the type of a column.


    Adds a new column.


    Removes a column.


    Renames a column.