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

Prerequisites

Set up the prerequisites required for all samples.

Building the sample 

Start the WSO2 CEP server with the sample configuration numbered 0019. For instructions, see Starting sample CEP configurations. This sample configuration creates the following. 

  • An event stream with the ID org.wso2.event.sensor.stream:1.0.0
  • An event receiver named wsReceiver to fetch events from the configured receiver email address  
  • An event publisher named loggerEventPublisher to log the received messages

Executing the sample

  1. Navigate to the <CEP_HOME>/samples/cep/producers/websocket/ directory, and execute the following Ant command using another tab in the CLI: ant -Dport=9099 -Dsn=0019

    The other optional parameters that can be used in the above command are defined in the <CEP_HOME>/samples/cep/producers/websocket/build.xml file.

    This builds the WebSocket client and publishes the events in the <CEP_HOME>/samples/cep/artifacts/0019/sensorStreamEvents.txt file to the wsReceiver endpoint.  You view the details of the events that are sent as shown below.
    events produced by WSO2 CEP 

  2. Start the WSO2 CEP server with the sample configuration numbered 0019. For instructions, see Starting sample CEP configurations.

The CEP server receiving the JSON events is logged in the CLI as shown below.

output log of the events received by WSO2 CEP

  • No labels