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

Introduction

This sample demonstrates how to receive incoming custom text events via the HTTP transport. Custom events are events with custom mappings that do not adhere to the default event formats. For more information on event formats, see Event FormatsThis sample does not process the incoming events. A log event publisher is used to log the received events, and to verify the messages.

Prerequisites

Set up the prerequisites required for all samples.

Building the sample 

Start the WSO2 CEP server with the sample configuration numbered 0006. 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>/samples/cep/artifacts/0006.
  • Creates an event stream named org.wso2.event.sensor.stream:1.0.0.
  • Creates an event receiver named httpReceiver with custom mapping.
  • Creates an event publisher named httpLogger to log the received messages.

Executing the sample

Open another tab in the CLI and issue the following ant command from the <CEP_HOME>/cep/samples/producers/http directory.

ant -Durl=http://localhost:9763/endpoints/httpReceiver -Dsn=0006

This builds the HTTP client and publishes the events in the <CEP_HOME>/samples/cep/artifacts/0006/httpReceiver.txt file to the httpReceiver endpoint. You can view the details of the events that are sent as shown in the log below.

The events received by WSO2 CEP are logged as shown below.

  • No labels