Search code examples
javaxmlwso2complex-event-processing

Using CEP EventBuilder service in custom WSO2 components


I created a WSO2 component (as a proper OSGi bundle) and it loads fine in the WSO2CEP server. This component emits XML messages which need to be further processed by CEP and its Event Builder.

Which OSGi service would receive and process my XML messages?

If none then how can I obtain a correct URL to the endpoint with an HTTP Input Event Adaptor, so I can just HTTP POST my XML message?


Solution

  • I believe, the component that you have created is an input event adaptor, then you can send a event by calling the onEventCall() method of InputEventAdaptorListener class. Please refer [1] for more info..

    To get the http url endpoint please refer below documentation [2]. The endpoint url should be as given below,

    For super tenants - http://localhost:9763/endpoints/<input_adaptor_name>/<topic> or https://localhost:9443/endpoints/<input_adaptor_name>/<topic>
    

    [1] https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/event-stream/event-input-adaptor/org.wso2.carbon.event.input.adaptor.http/1.0.0/src/main/java/org/wso2/carbon/event/input/adaptor/http/HTTPMessageServlet.java

    [2] https://docs.wso2.com/display/CEP310/Input+HTTP+Event+Adaptor

    Thanks, Mohan