Unknown macro: {next_previous_links}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Cassandra datasource is used to set up a connection to a Cassandra storage. In WSO2 DAS, you can create a Cassandra data source through the UI as a custom data source. You can create a Cassandra datasource as a custom data source using the DAS management console  as follows.


  1. Log in to the DAS management console.
  2. Click Datasources in the Configure menu, and then click Add Datasource.
  3. Select Custom as the Data Source Type.
  4. Enter CASSANDRA as Custom Data Source Type, and enter a unique name for Name.
  5.  Enter the below Cassandra data source configuration for Configuration.  

    <datasource>
        <name>WSO2_ANALYTICS_DS_CASSANDRA</name>
        <description>The Cassandra datasource used for analytics</description>
        <definition type="CASSANDRA">
            <configuration>
                <contactPoints>localhost</contactPoints>
                <port>9042</port>
                <username>admin</username>
                <password>admin</password>
                <clusterName>cluster1</clusterName>
                <compression>none</compression>
                <poolingOptions>
                    <coreConnectionsPerHost hostDistance="LOCAL">8</coreConnectionsPerHost>
                    <maxSimultaneousRequestsPerHostThreshold hostDistance="LOCAL">1024</maxSimultaneousRequestsPerHostThreshold>
                </poolingOptions>
                <queryOptions>
                    <fetchSize>5000</fetchSize>
                    <consistencyLevel>ONE</consistencyLevel>
                    <serialConsistencyLevel>SERIAL</serialConsistencyLevel>
                </queryOptions>
                <socketOptions>
                    <keepAlive>false</keepAlive>
                    <sendBufferSize>150000</sendBufferSize>
                    <connectTimeoutMillis>12000</connectTimeoutMillis>
                    <readTimeoutMillis>12000</readTimeoutMillis>
                </socketOptions>
            </configuration>
        </definition>
    </datasource>

For information on the above properties, and other properties that you can specify in this datasource configuration, go to Java Driver 2.0 for Apache Cassandra Documentation.

  • No labels