WSO2 Complex Event Processor is succeeded by WSO2 Stream Processor. To view the latest documentation for WSO2 SP, see WSO2 Stream Processor Documentation.

Versions Compared

Key

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

...

Localtab Group

If the output stream name is testStream and the stream version 1.0.0, the generated URL would be:

ws://localhost:9763/outputui/testStream/1.0.0
OR
ws://localhost:9763/outputui/testStream/1.0.0   
Localtab
titleUsing the Management Console

Follow the procedure below to add a UI event publisher using the Management Console. For detailed information on creating publishers, see Configuring CEP to Create Alerts.

  1. Log into the CEP Management Console. In the Main tab, click Publishers to open the Available Event Publishers page.
  2. Click Add Event Publisher to open the Create a New Event Publisher page.
  3. Enter a unique name for the UI publisher in the Event Publisher Name parameter.
  4. Select the relevant stream for the Event Source parameter.

     

    Note

    An event stream should be defined before you define the publisher. Chart rendering problems could occur in browser if event streams receive events at high throughput.

  5. Select ui for the Output Event Adapter Type parameter.

The following image is an example of a UI event publisher configuration.
UI event publisher 

Continue to add properties as instructed in the Configuring adapter properties section.

Configuring adapter properties
Anchor
Properties
Properties

Follow the procedure below to add properties to a UI event publisher.

  1. In the Mapping Configuration section, select the relevant message format for the Message Format parameter.
  2. In the Output Event Stream parameter, enter the name of the stream which will be exposed to an external system by the publisher.
  3. In the Output Event Version parameter, enter the version of the stream you entered in the Output Event Stream parameter.
  4. Click Add Event Publisher to save the changes.

The adapter will be able to send events via the specified WebSocket or HTTP endpoint. An endpoint to send outgoing events will be available on the following URLs.

Tenant TypeSuper TenantTenant
URL Format

ws://<host>:9763/outputui/<Output Stream Name>/<Output Stream Version>  
OR
http://<host>:9763/outputui/<Output Stream Name>/<Output Stream Version>

ws://<host>:9763/outputui/t/<tenant_domain>/<Output Stream Name>/<Output Stream Version>
OR  
http://<host>:9763/outputui/t/<tenant_domain>/<Output Stream Name>/<Output Stream Version>
Example

If the output stream name is testStream, stream version 1.0.0 , and the tenant domain my company.com the generated URL would be:

ws://localhost:9763/outputui/t/mycompany.com/testStream/1.0.0

OR

http://localhost:9763/outputui/t/mycompany.com/testStream/1.0.0

Localtab
titleUsing a configuration file

Follow the steps below to configure output UI event publisher using a configuration file.

  1. Create an XML file with the following output UI event adapter configurations. Note that  <eventPublisher> should be the root element.

    Code Block
    languagexml
    <eventPublisher xmlns="http://wso2.org/carbon/eventpublisher" name="UIEventPublisher" statistics="disable" trace="disable">
       <from streamName="testStream" version="1.0.0" />
       <mapping customMapping="disable" type="wso2event" />
       <to eventAdapterType="ui">
          <property name="output.event.stream.version">1.0.0</property>
          <property name="output.event.stream.name">testStream</property>
       </to>
    </eventPublisher>
  2. Add the configuration file to the <CEP_HOME>/repository/deployment/server/eventpublishers/ directory.

    Info

    Since hot deployment is supported, you can also add/remove output event adapter configuration files to deploy/undeploy output event adapters to/from the server.

...