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

CEP Configuration Overview

This page gives an overall summary of the main CEP components that you need to configure in order to set up WSO2 CEP to process events, and how to configure them through the CEP management console UI. Given below are the main components in CEP:

  1. Input Event Adapter
  2. Event Builder
  3. Event Streams Manager
  4. Event Processor
  5. Event Formatter
  6. Output Event Adapter

The diagram below shows the basic flow of events through the components mentioned above:

You can create streams and execution plans using the CEP management console, which is usually available at https://localhost:9443/carbon. Optionally, you can directly create and deploy the required files in the file system.

Creating event adapters

In CEP there are two types of event adapters,

  • Input Event Adapters : To receive events from a source
  • Output Event Adapters : To send events to a sink

CEP has a number of inbuilt event adapters to support various transport protocols and persistence mechanisms (such as HTTP, JMS, Thrift, Cassandra etc).

To configure an event adapter, you log in to the CEP management console and select  Event Processor Configs menu under the Configure menu. The UI looks as follows:

The event adapter details that open for you to fill depend on the event adapter type you choose. For details on how to define an event adapter, see Event Adapters.

Creating event streams

An event stream is a core part of the CEP configuration. Each event stream contains events based on its stream definition. A typical stream definition contains metadata, correlation data and payload data attributes. When writing complex queries, you use one or more of these defined streams as inputs and outputs.

To configure an event stream, you log in to the CEP management console and select Main  Event Processor  Event Streams  Add Event Stream menu. The UI looks as follows:

In the stream attributes section, there are three types of attribute options:

  1. Metadata : meta information related to the event
  2. Correlation data : data required to correlate between different points/entities
  3. Payload data : all other data to be processed

The following UI shows how you define the three types of stream attributes:

Once the event stream is added successfully, you are asked to create the event builder for the stream. You can use the default WSO2Event builder, chose to create a custom event builder or specify the event builder at a later time.

For more information on streams, See Working with Event Streams.

Creating event builders

An event builder converts different input event formats (such as XML, WSO2Event, Maps) to a unified format that is supported by the processing engine.

To configure an event builder, you log in to the CEP management console and select Main  Event Processor  Event Streams menu. The UI looks as follows:

Then click on In-Flows link in the Action column of the stream that you wish to build the event builder for. A UI similar to the following opens:

Click Receive from External Event Stream(via Event Builder) and the Create New Event Builder screen pops up. After entering necessary information, click Add Event Builder.

When creating event builders, you provide a name and select an input event adapter. Also, provide the configurations required by the selected input event adapter, and these input adapter -specific configurations are refereed to as "Message Properties". 

Message properties configurations are specific to the selected input event adapter type. Please refer "Configuring Message Properties" section under each Input Adapter documentation for more details on message properties of different input adapter types.

Creating event formatters

An event formatter is responsible for converting unified events received from the processing engine to various other event formats such as XML, JSON and Maps for sending them back to an external event sink.

To configure an event formetter, you log in to the CEP management console and select Main  Event Processor  Event Streams menu and get the complete list of available streams. Then, click the Out-Flows link in the Action column of the stream that you wish to build the event formatter for. The following UI opens:

Now click Publish to External Event Stream(via Event Builder) and the Create a New Event Formatter screen pops up. After entering necessary information, click Add Event Builder.

When creating event formatters, you provide a name and select an output event adapter. Also, provide the configurations required by the selected output event adapter. These output-adapter-specific configurations are refereed to as Message Properties. 

Message properties configurations are specific to the selected output event adapter type. See Configuring Message Properties sections in each topic of the Output Event Adapters section for more details on message properties of different output event adapter types.

Creating execution plans

To configure an execution plan, you log in to the CEP management console and select Main  Event Processor Execution Plans Add Execution Plan menu. The UI looks as follows:

Fill in this form with basic details such as execution plan name. The Siddhi configurations section contains advanced setup options such as persisting periodical snapshots and distributed processing. The Query Expressions section has a subsection for imported streams. Imported streams feed incoming events to the processing engine of the CEP. In the import stream drop-down list, you see streams already defined. You define event streams as described in the previous section, and then proceed by selecting them.

Once you finish creating the required streams, you proceed to import them to the Siddhi processing engine with the required alias (using 'As' field) as follows:

When a stream is imported successfully, it is displayed underneath the import section with the Siddhi query syntax as follows:

Once queries are added, you export the relevant streams so that CEP can output events. In the Value of field, type in the correct stream name and then select the Stream Id to which the output events are exported.

Once you export the stream successfully, it is displayed above the query editor text area as follows:

After adding the exported streams, save the execution plan.

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