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. |
Creating
...
stream definitions (
...
streams)
- Start the CEP, log in to its management console, select Main -> Event Streams and click Add Event Stream.
- Enter details in the form that appears and click the Add Event Stream button at the end of the form. For example,
Here, fill the necessary fields according to the stream definition that you want to create. - Finally, Click the Add Event Stream button to add the stream definition to the registry. Then Available Event Stream page will open. To delete event stream, click the Delete button.
...
Info |
---|
Other than the server UI, you can also define the stream definition using a config file which is in the |
Code Block | ||
---|---|---|
| ||
<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> |
Event
...
in-
...
flows and
...
out-
...
flows
Each event stream lets events to flow in or out of the processing engine. These in-flows and out-flows of events can be customized to have different formats and mappings. For the events flowing in, user can create an event builder to convert them from different formats and map them to a format acceptable by the event processor. For the events flowing out, event formatters are used to convert them to various formats.
To create an event builder or a formatter, select Event Streams under the Main menu. The Available Streams page that appears contains the existing streams and supported Actions. Under the actions, users can choose to create an event builder by selecting the In-Flows and then selecting Add Event Builder. Similarly, an event formatter can be added by clicking Out-Flows in Available Streams page.
A Following sections include a detailed guide on Event Builders and Formatters can be found in the following sections: Child pages (Children Display)
Child pages (Children Display) |
---|