Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
The default key space name of the WSO2 BAM server is EVENT_KS. By default, BAM persists data in EVENT_KS keyspace but you For indexing purposes, another key-space is used by BAM. Default name for index key space is EVENT_INDEX_KS

Both the default key space and index key space are referred by the  <keySpaceName> element in <PRODUCT_HOME>/repository/conf/advanced/streamdefn.xml file as follows.

 

Code Block
languagexml
<StreamDefinition>
    <EventDatasourceName>WSO2BAM_CASSANDRA_DATASOURCE</EventDatasourceName>
    <EventIndexDatasourceName>WSO2BAM_CASSANDRA_EVENT_INDEX_SOURCE</EventIndexDatasourceName>
</StreamDefinition>

 

Changing the default key space name

You can define a different keyspace key space name for BAM persistence. It helps in physical separation of data, especially where the same cassandra cluster is used by multiple solutions/services. To change this,

...

edit   the <keySpace>  element of the  WSO2BAM_CASSANDRA_DATASOURCE  in <PRODUCT_HOME>/repository/conf/

...

datasources/

...

bam-datasources.xml file as follows.

...

For indexing purposes, another key-space is used by BAM. Default name for index key-space is EVENT_INDEX_KS.

...

 

Code Block
languagexml
 <datasource>
            <name>WSO2BAM_CASSANDRA_DATASOURCE</name>
            <description>The datasource used for Cassandra data</description>
            <definition type="CASSANDRA">
                <configuration>
                    <keySpace>EVENT_KS</keySpace>
                </configuration>
            </definition>
        </datasource>

Changing the index key space name

To change the index key space name, edit   the  <keySpace>  element of the  WSO2BAM_CASSANDRA_EVENT_INDEX_SOURCE in  <PRODUCT_HOME>/repository/conf/

...

datasources/

...

bam-datasources.xml

...

 file as follows.

Code Block
languagexml
<datasource>
            <name>WSO2BAM_CASSANDRA_EVENT_INDEX_SOURCE</name>
            <description>The datasource used for Cassandra data</description>
            <definition type="CASSANDRA">
                <configuration>
                    <keySpace>EVENT_INDEX_KS</keySpace>
                </configuration>
            </definition>
        </datasource>