Output Cassandra event adapter is used to dump output events in a Cassandra database.
Configuring output Cassandra event adapter
You can configure the output Cassandra event adapter either using the management console or using a configuration file.
Configure using the management console
Follow the steps below to configure output Cassandra event adapter using the management console. This deploys the event adapter in the <PRODUCT_HOME>/repository/deployment/server/outputeventadaptors/
directory.
- Cassandra is not enabled by default in WSO2 products. Therefore, before using Cassandra, start the product in Cassandra-enabled mode using the following command:
./wso2server.sh -Ddisable.cassandra.server.startup=false
- Log in to product's management console, and click Configure.
- Click Output Event Adaptors in the Event Processor Configs menu, and then click Add Output Event Adaptor.
Enter the details as shown in the below example.
Click Add Event Adaptor.
Configure using a configuration file
Follow the steps below to configure output Cassandra event adapter using a configuration file.
Create an XML file with the following output Cassandra event adapter configurations. Output event adapter implementation must start with
<outputEventAdaptor>
as the root element.<outputEventAdaptor name="outputCassandraAdaptor" statistics="disable" trace="disable" type="cassandra" xmlns="http://wso2.org/carbon/eventadaptormanager"> <property name="index.all.columns">false</property> <property name="user.name">cassandra</property> <property name="port">9160</property> <property name="password">cassandra</property> <property name="cluster.name">Test Cluster</property> <property name="hostname">localhost</property> </outputEventAdaptor>
- Add the XML file to the
<PRODUCT_HOME>/repository/deployment/server/outputeventadaptors/
directory. Since hot deployment is supported in the product, you can simply add/remove output event adapter configuration files to deploy/undeploy output event adapters to/from the server.
After an adapter is successfully added, it gets added to the list of adapters displayed under Event Processor Configs in the Configure menu of the product's management console. Click Edit to change its configuration and redeploy it. This opens an XML-based editor allowing you to edit the event adapter configurations from the UI. Do your modifications and click Update. You can also delete it, enable/disable statistics or enable/disable tracing on it using the provided options in the UI.
Configuring output Cassandra event adapter message properties
Property | Description |
---|---|
Column Family Name | Name of the Cassandra family to which, you want to input data. |
Keyspace Name | Name of the Cassandra keyspace to which, you want to input data. |
Output Event Type | The incoming event type to be mapped. The Output Cassandra event adapter supports only map type mappings. |