Events are received by WSO2 CEP/DAS server using event receivers, which manage the event retrieval process. Event receiver configurations are stored in the file system as deployable artifacts. WSO2 CEPDAS CEP/DAS receives events via multiple transports in JSON, XML, Map, Text, and WSO2Event formats, and converts them into streams of canonical WSO2Events to be processed by the server.
Table of Contents | ||
---|---|---|
|
Configuring global properties
Global properties can be set for individual input event adapter types in the <DAS_HOME>/repository/conf/input-event-adapters.xml
file. A global property set for an input event adapter type in this file applies to all the receivers with that adapter type. If a property available for an adapter type by default is removed, the default value of the property applies. Click the relevant tab to view the properties available by default for a specific input event adapter type.
Info |
---|
Custom properties cannot be added as global properties. |
Localtabgroup | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Event receiver types
Anchor | ||||
---|---|---|---|---|
|
WSO2 CEP/DAS has the capability of receiving events from event receivers via various transport protocols. Following are the event receivers that come with WSO2 CEP/DAS by default. You can write extensions to support other transport.
- Email Event Receiver
- File-tail Event Receiver
- HTTP Event Receiver
- JMS Event Receiver
- Kafka Event Receiver
- MQTT Event Receiver
- SOAP Event Receiver
- WebSocket Event Receiver
- WebSocket Local Event Receiver
- WSO2Event Event Receiver
Event receiver configuration
An event receiver configuration has four main sections as shown in the example below.
...
Section | Description |
---|---|
From | An input event adapter (transport) configuration via which the event receiver receives events. |
Adapter properties | Specific properties of the selected input event adapter. For information on configuring adapter properties of various transport types, see Event Receiver Types. |
To | The event stream from which the event receiver will fetch the events for processing. |
Mapping configuration | The format of the message that is received. You can configure custom mappings on the selected format via advanced settings. For information on configuring custom mappings, see Input Mapping Types. |
Creating event receivers
You can create event receivers either using the management console or or using a configuration file as explained below.
Anchor | ||||
---|---|---|---|---|
|
...
- Log in to the management console, and click Main.
- Click Receivers in the Event menu, and then click Add Event Receiver.
Enter a name for Event Receiver Name. (Do not use spaces between the words in the name of the event receiver.)
Select the input transport from which you want to receive events for the Input Event Adapter Type, and enter the Adapter Properties accordingly. For instructions on the adapter properties of input transport types, see Event Receiver Types .
Select the Event Stream, to which you want to map the received events.
Select the Message Format which you want to apply on the receiving events. WSO2 servers allow users to configure events in XML, JSON, Text, Map, and WSO2Event event formats.
- Click Advanced to define custom input mappings based on the message format you selected, if you are sending events that do not adhere to the default event formats /wiki/spaces/TESB/pages/32604416. For more information on custom input mapping types, see Input Mapping Types.
- Click Add Event Receiver, to create the event receiver in the system. When you click OK in the pop-up message on successful addition of the event receiver, you view it in the Available Event Receivers list as shown below.
...