com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Working with Event Streams

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.

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)

  1. Start the CEP, log in to its management console, select Main -> Event Streams and click Add Event Stream.
  2. 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.
  3. 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.

Once the event stream is added successfully, you will be asked if you want to create the event builder for the stream. You can use Default WSO2Event builder or chose to create a custom event builder by clicking OK. Or else you can create the event builder later by clicking "Create Later" .

To create an event builder, event formatter  or execution plan it is mandatory to create necessary event streams before hand.

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

<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.

Following sections include a detailed guide on event builders and event formatters.

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.