Versions Compared

Key

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

The input WebSocket event adapter is used to receive events via a WebSocket. You can specify the URL of a WebSocket, so that WSO2 products can receive events from it. The input WebSocket event adapter supports XML, JSON, and text type mappings. To use it you need to do the following configurations.

...

  1. Log in to the product's management console and click Configure.
  2. Click Input Event Adaptors in the Event Processor Configs menu, and then click Add Input Event Adaptor.
  3. Enter details as shown in the below example. 

  4. Click Add Event Adaptor.

...

  1. Create an XML file with the following WebSocket Event event Adapter configurations. Input event adapter implementation must start with <inputEventAdaptor> as the root element.

    Code Block
    languagexml
    <inputEventAdaptor name="websocketInputAdaptor" statistics="disable" trace="disable" type="websocket" xmlns="http://wso2.org/carbon/eventadaptormanager">
    <property name="websocket.server.url">ws://localhost:9099</property>
    </inputEventAdaptor>
  2. Add the XML file to the <PRODUCT_HOME>/repository/deployment/server/inputeventadaptors/ directory. Since hot deployment is enabled, you can simply add/remove files to deploy/undeploy from the server. 

...