Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
Description
FromAn input event adapter (transport) configuration via which the event receiver receives events.
Adapter propertiesSpecific properties of the selected input event adapter. For information on configuring adapter properties of various transport types, see Event Receiver Types.
ToThe event stream from which the event receiver will fetch the events for processing.
Mapping configurationThe 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.

...

  1. Log in to the management console, and click Main.
  2. Click Receivers in the Event menu, and then click Add Event Receiver.
  3. Enter a name for Event Receiver Name. (Do not use spaces between the words in the name of the event receiver.)

  4. 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.

  5. Select the Event Stream, to which you want to map the received events.

  6. 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.

  7. 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 /wiki/spaces/TESB/pages/32604416 default event formatsFor more information on custom input mapping types, see Input Mapping Types.
  8. 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.
    available event receivers list

...

  1. Create an XML file with the following event receiver configurations. An event receiver implementation must start with  <eventReceiver>  as the root element.

    Note

    In the following configuration, specify the respective adapter properties based on the transport type of the receiver within the <from> element. For the respective adapter properties of the event receiver configuration based on the transport type, see Event Receiver Types .

    Code Block
    languagexml
    <eventReceiver name="EVENT-RECEIVER-NAME" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
        <from eventAdapterType="EVENT-ADAPTER-TYPE">
           .................................
        </from>
        <mapping customMapping="disable" type="xml"/>
        <to streamName="Test Stream" version="1.0.0"/>
    </eventReceiver>

    The properties of the above configuration are described below.

    Adapter propertyDescription
    name
    Name of the event receiver
    statistics
    Whether monitoring event statistics is enabled for the receiver
    trace
    Whether tracing events is enabled for the receiver
    xmlns
    XML namespace for event receivers
    eventAdapterType
    Type of the event adapter.
    customMapping
    Whether a custom mapping is enabled on the receiver.
    type
    Type of the enabled custom mapping.
    streamName
    Name of the event stream to which the receiver is mapped.
  2.   Add the XML file to the <PRODUCT_HOME>/repository/deployment/server/eventreceivers/ directory. Since hot deployment is supported in the product, you can simply add/remove event receiver configuration files to deploy/undeploy event receivers to/from the server.

...