Sample 0007 - Receiving WSO2 Events Via WSO2Event Receiver
Introduction
This sample demonstrates how to receive incoming WSO2 events via the WSO2Event receiver. WSO2Event receiver is implemented based on Apache Thrift. This sample does not do any processing on the incoming event. The log event publisher is used to log the received events, and to verify the messages.
Prerequisites
There is no special requirements, but Prerequisites required for 'All samples' should be done.
Building the sample
Start the WSO2 CEP server with the sample configuration numbered 0007. For instructions, see Starting sample CEP configurations. This sample configuration does the following:
Changes the default Axis2 repo from
<CEP_HOME>/repository/deployment/server to <CEP_HOME>/sample/artifacts/0007
Creates a stream with id
org.wso2.event.sensor.stream:1.0.0
.Creates an event receiver with name
wso2eventReceiver
.Creates an event publisher to log the received messages with name
wso2eventLogger
.
Executing the sample
Open another terminal, go to
<CEP_HOME>/samples/producers/wso2-event
and run the following command:ant -DstreamId=org.wso2.event.sensor.stream:1.0.0 -Dsn=0007
It builds the wso2event client and publishes the events at
<CEP_HOME>/samples/artifacts/0007/org_wso2_event_sensor_stream_1_0_0.csv
to thewso2eventReceiver
endpoint.You can see the events getting received by CEP by the logs in its console.