||
Skip to end of metadata
Go to start of metadata

The WSO2BAM_CASSANDRA_EVENT_INDEX_SOURCE, which is defined in the <PRODUCT_HOME>/repository/conf/bam-datasources.xml file as follows, is used to store Cassandra data.

Replace the hostportusername and password settings with your custom values, and also the other values accordingly in the bam-datasources.xml file as shown in the below example.

<datasource>
            <name>WSO2BAM_CASSANDRA_EVENT_INDEX_SOURCE</name>
            <description>The datasource used for Cassandra data</description>
            <definition type="CASSANDRA">
                <configuration>
                    <hosts>localhost</hosts>
                    <port>9160</port>
                    <username>admin</username>
                    <password>admin</password>
                    <keySpace>EVENT_INDEX_KS</keySpace>
                    <externalCassandra>false</externalCassandra>
                    <replicationFactor>1</replicationFactor>
                    <strategyClass>org.apache.cassandra.locator.SimpleStrategy</strategyClass>
                    <readConsistencyLevel>QUORUM</readConsistencyLevel>
                    <writeConsistencyLevel>QUORUM</writeConsistencyLevel>
                    <gcGraceInterval>864000</gcGraceInterval>
                </configuration>
            </definition>
        </datasource>

The datasource configuration options are as follows:

Parameter
Description
hosts

The host IP addresses of Cassandra nodes in the clustered mode. Values should be given as comma separated values. For example:

<hosts>node1 IP,node2 IP,node3 IP</hosts>
port

Port of the Cassandra instance. In clustered mode, all ports are required to have the same value. For example: 9160

usernameUsername of the user account, which is used to log in to the Cassandra instance.
passwordPassword of the user account, which is used to log in to the Cassandra instance.

keySpace

Key space name for Cassandra. The default value is EVENT_INDEX_KS.

externalCassandra

By default, this is set as false in all Cassandra datasources, to point to the Cassandra instance that is shipped with WSO2 BAM. If there is a port offset applied, update the Cassandra URL of the respective Cassandra data source will be updated accordingly.


When Cassandra datasource is located in an external Cassandra cluster, set this to true. This will prevent WSO2 BAM from automatically incrementing the port offset (to prevent modifying the Cassandra URL), once a port offset has been introduced to the system.
replicationFactorThe total number of replicas across the cluster. Default value is 1.
strategyClassSets the distribution of the replicas across the nodes in the cluster depending on the cluster's topology. Default value is org.apache.cassandra.locator.SimpleStrategy. For more information on this parameter, go to Apache Cassandra 1.0 Documentation.

readConsistencyLevel

Number of replicas, on which the write must succeed before returning an acknowledgement to the client application.  Default  value is QUORUM. For more information on this parameter, go toApache Cassandra 1.0 Documentation.

writeConsistencyLevelNumber of replicas, which must respond before a result is returned to the client application. Default  value is QUORUM. For more information on this parameter, go to  Apache Cassandra 1.0 Documentation .
gcGraceIntervalTime to wait before garbage collecting tombstones. In Cassandra, the delete operation doesn't just wipe out all traces of the data being removed immediately. Instead of wiping out data on delete, Cassandra replaces it with a special value called a tombstone.  Default values is 864000 seconds. (10 days). For more information on this parameter, go to Cassandra Wiki.
  • No labels