Versions Compared

Key

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

Event Streams are another main part in CEP. All the processing happens based on streams. Here, Event streams need to be defined as WSO2Event Stream Definition. All the created streams are stored in the registry (governance) of the CEP.

Info

Don't try to edit stream definitions directly using registry browser. Only use the following stream management UI, because using registry browser may lead to unpredictable situations.

...

Info

Other than the server UI, you can also define the stream definition using a config file which is in the <CEP_HOME>/repository/conf/data-bridge/stream-definitions.xml file. But this file used to create streams only in the server start-up (This file is not hot deploy-able). Please see the below syntax

Code Block
languagehtml/xml
<streamDefinitions xmlns="http://wso2.org/carbon/databridge">

    <streamDefinition>

        {
        "name":"org.wso2.sample.mediation.stats",
        "version":"1.0.0",
        "metaData":[
        {"name":"host","type":"STRING"}] ,
        "correlationData":[],
        "payloadData":[
        {"name":"direction","type":"STRING"},
        {"name":"timestamp","type":"LONG"},
        {"name":"resource_id","type":"STRING"}
        ]
        }

    </streamDefinition>

</streamDefinitions>

...