Input Event Adaptors

Configuring WSO2Event Input Event Adaptor

WSO2Event event adaptor handles WSO2 Common Events. It receives events over Thrift using TCP, SSL, HTTP, HTTPS and also JSON events via HTTP and HTTPS. By default, the CEP comes with an WSO2Event event adaptor, which is used to receive fired events

Note: You can use the WSO2Event event adaptor that comes with the CEP only to receive incoming events. But, CEP can send output events to any (including external) WSO2Event event adaptors.

By default, Input WSO2Event event adaptor starts with CEP, and its default ports are as follows:

tcp port : 7611
ssl port : 7711
http port : 9763
https port : 9443

The steps below explain how to configure using the management console or using an XML file as explained in step 5.

  1. Log in to the CEP management console, selectInput Event Adaptors menu and then click Add Input Event Adaptor.

  2. Enter details in the form that appears and click Add Event Adaptor button at the end of the form. For example,
    Create Event Adaptor
    Following values are used in the configuration above:


  3. After a adapter is successfully added, you can change its configuration and redeploy it. To do this, click the Edit link associated with it. You can also click the other links associated with it to delete it or enable statistics and tracing.

  4. An XML based�editor opens allowing you to edit the event adaptor configuration from UI itself, without having to edit the file in the file system. Do your modifications and click Update.

  5. Alternatively, you can specify an event adaptor configuration using an XML file and save it in <PRODUCT_HOME>/repository/deployment/server/inputeventadaptors directory, which is the Input event adaptor deployment directory. Since hot deployment is enabled, you can simply add/remove files to deploy/undeploy from the server.

    Create the XML file with the following WSO2Event event adaptor configurations. Input event adaptor implementation must start with <inputEventAdaptor> root element.
    <inputEventAdaptor name="localEventReceiver" type="wso2event"
                                xmlns="http://wso2.org/carbon/eventadaptormanager"></inputEventAdaptor>

Configuring stream definition stores for the adaptor

Stream definition stores are used to store the stream definitions of the incoming event streams. WSO2Event event adaptor supports three types of stream definition stores as follows:


By default, CEP uses the registry-based stream definition store. To change the default stream definition store, add the appropriate stream definition store implementation class to <PRODUCT_HOME>/repository/conf/data-bridge/data-bridge-config.xml file as follows:


<dataBridgeConfiguration xmlns="http://wso2.org/carbon/databridge">
    
    <StreamDefinitionStore>
        org.wso2.carbon.databridge.streamdefn.cassandra.datastore.CassandraStreamDefinitionStore
    </StreamDefinitionStore>
    
    ...
</dataBridgeConfiguration>  

Info: : In registry-based stream definition store, the stream definitions are stored in /_system/governance/StreamDefinitions. In Cassandra-based stream definition store, the stream definitions are stored in META_KS key space.

For more details on configuring different types of event adaptors, Please refer the official documentation Here.