This documentation is for WSO2 Complex Event Processor 4.0.0. View documentation for the latest release.
WSO2 Complex Event Processor is succeeded by WSO2 Stream Processor. To view the latest documentation for WSO2 SP, see WSO2 Stream Processor Documentation.
Skip to end of metadata
Go to start of metadata

UI event publisher is an internal event publisher that comes with WSO2 products by default. You can configure it with WSO2Event  output mapping types.

Configuring global properties

The following global properties can be set for the UI event publisher type in the <CEP_HOME>/repository/conf/input-event-adapters.xml file. These properties apply to all the publishers of the ui type. If a global property available by default is removed, the default value of the property is considered.

Property KeyDescriptionData TypeDefault Value
eventQueueSizeThe maximum number of events allowed in the adapter queue when the rate at which a UI publisher receives events to be published higher than the rate at which the relevant UI is accepting the events. When the number of events received by the publisher exceeds the value specified for this property, the publisher stops accepting events until the events that are already in the queue get published. Therefore, if you want to reduce system latency, a higher queue size should be specified.Integer30
minThreadThe minimum number of threads (including idle threads) that should be available in the thread pool at a given time.Integer8
maxThreadThe maximum number of threads (including idle threads) that should be available in the thread pool at a given time.Integer100
keepAliveTimeInMillisThe maximum number of milliseconds that idle threads should be kept alive when the total number of threads in the pool exceeds the number of cores in the machine.Integer20000
jobQueueSizeThe maximum number of milliseconds that idle threads should be kept alive when the total number of threads in the pool exceeds the number of cores in the machine.Integer10000

Configuring a UI event publisher

A UI event publisher can be configured using the Management Console or a configuration file.

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.


    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

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>  
http://<host>:9763/outputui/<Output Stream Name>/<Output Stream Version>

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

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




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




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.

    <eventPublisher xmlns="" name="UIEventPublisher" statistics="disable" trace="disable">
       <from streamName="testStream" version="1.0.0" />
       <mapping customMapping="disable" type="wso2event" />
       <to eventAdapterType="ui">
          <property name="">1.0.0</property>
          <property name="">testStream</property>
  2. Add the configuration file to the <CEP_HOME>/repository/deployment/server/eventpublishers/ directory.

    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.


Once the publisher is successfully added, it will be displayed in the Available Event Publishers page. You can click Edit  to change its configuration and redeploy it. This opens an XML-based editor allowing you to edit the event adapter configurations from the UI.  Make your modifications and click Update. You can also delete it, enable/disable statistics or enable/disable tracing on it using the provided options in the UI.

Related samples

For more information on ui event publisher type, see the following sample.

  • No labels