This sample demonstrates the usage of the UI publisher using a client app. This sample does not have Siddhi queries because it does not not use any execution plans.
Building the sample
Start the WSO2 CEP server with the sample configuration numbered 0071. For instructions, see Starting sample CEP configurations. This sample configuration does the following.
Creates an event stream named
Creates an event publisher named
Loads the events stored in the
<CEP_HOME>/samples/cep/artifacts/0071/eventsimulatorfiles/events.csvfile to the event simulator.
- Deploys a Jaggery application named
outputuitest. This application functions as the client that consumes the events published by the UI publisher.
Executing the sample
Follow the steps below to execute the sample.
- Access the Analytics Dashboard using the following URL.
Access the the following page.
This opens the following form with the fields filled in with default values as shown below.
The fields in the form are described in the table below.
Field Name Description Default Value Stream Name The name of the event stream to which you want to subscribe. When events with values for the attributes defined in this stream are received by the Output Adapter UI test application.
Version The version of the event stream to which you want to subscribe.
CEP Host The host on which the CEP server (which contains the UI publisher) runs.
CEP Port The port on which the CEP server (which contains the UI publisher) runs.
UI publisher supports two types of subscriptions named
HTTP. If you select
Websocketfor this field, the client application receives events via the Websocket transport. If you select
HTTPfor this field, the client application receives events via the HTTP transport.
HTTPsubscription is used, the events are polled from the UI publisher at a constant interval, and this interval needs to be specified in the Polling Interval field.
Polling Interval 30
- Click Connect.
- Log in to the management console.
- Click Tools, and then click Event Simulator.
- Access the Web app which you deployed in Prerequisites via your Web browser using the following URL: http://localhost:9763/outputuitest/
Enter the following details in the Web app as shown below.
Stream Name: org.wso2.event.sensor.stream
CEP Host: localhost
CEP Port: 9763
Polling Interval: 30
Secure level: UNSECURED
Click Play on the corresponding event stream as shown below, to send the events in the
<CEP_HOME>/samples/cep/artifacts/0071/eventsimulatorfiles/events.csvfile to the publisher.
You view the output events published from the CEP which are received by the Web app as shown below.