Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Cassandra output event adapter is used to dump events having map dumps events in the map format to a Cassandra database.

Cassandra output event adapter requires following adopter configurations;

...

Adapter Property

...

Possible Values

...

Default

...

Description

...

 

...

Hostnames or ipaddresses separated by comma

e.g., testhost1,testhost2

...

Table of Contents
maxLevel3

Creating a Cassandra output event adapter

For instructions on creating a Cassandra output event adapter, see Publishing Events.  

Configuring adapter properties

Specify the Adapter Properties, when creating a Cassandra output event adapter using the management console as shown below.

Cassandra event publisherImage Added

Info

After entering the above adapter properties, select the Message Format which you want to apply on the published events. Also, click Advanced to define custom output mappings based on the Message Format you selected. For more information on custom output mapping types, see Publishing Events in Various Event Formats.

You can also define the respective adapter properties of the event publisher based on the transport type within the <to> element of the event publisher configuration in the <CEP_HOME>/repository/deployment/server/eventpublishers/ directory as follows.

Code Block
languagexml
<eventPublisher name="CassandraOutputEventAdapter" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventpublisher">
  ........................
  <to eventAdapterType="cassandra">
    <property name="port">9160</property>
    <property name="indexed.columns">key1,key2</property>
    <property name="key.space.name">CEP_KS</property>
    <property name="user.name">admin</property>
    <property name="column.family.name">CF_Transactions</property>
    <property name="hosts">testhost1,testhost2</property>
    <property name="replication.factor">3</property>
    <property encrypted="true" name="password">kuv2MubUUveMyv6GeHrXr9il59ajJIqUI4eoYHcgGKf/BBFOWn96NTjJQI+wYbWjKW6r79S7L7ZzgYeWx7DlGbff5X3pBN2Gh9yV0BHP1E93QtFqR7uTWi141Tr7V7ZwScwNqJbiNoV+vyLbsqKJE7T3nP8Ih9Y6omygbcLcHzg=</property>
    <property name="strategy.class">SimpleStrategy</property>
  </to>
</eventPublisher>

The above adapter properties are described below.

Adapter Property
Description
Configuration file propertyExample
Hosts

Hostnames or IP addresses separated by commas

hosts
testhost1,testhost2
PortThe Cassandra port. If you do not define this, the default port will be used
port
9160
User NameUsername for the database
user.name
admin
PasswordPassword for the database
password
admin
Keyspace NameCassandra keyspace name
key.space.name
CEP_KS
Column Family Name Column family namespace under the defined keyspace
column.family.name
CF_Transactions
Strategy Class  The strategy of the keyspace, if not defined '. If you do not define this, org.apache.cassandra.locator.SimpleStrategy' will be used
strategy.class
SimpleStrategy
Replication Factor  The replication factor of the keyspace, if not defined '1' .  If you do not define this, 1 will be used.
replication.factor

3

Indexed Columns  

Columns to be indexed, separated by comma

e.g., key1,key2.

commas. Index of type "KEYS" with the name "{keyspaceName}_{columnFamilyName}_{columnKey}_Index" will be applied to the columns.

indexed.columns

key1,key2