Hi all, Please follow the steps bellow when publishing events from carbon servers to DAS/CEP. Here we keep the DAS/CEP server location in CARBON_HOME/repository/deployment/server/eventpublishers directory and this is common across platform.
- Install the Event Publisher Aggregate feature from p2_repo [1] - Install Registry Core feature if not installed - Create event stream and deploy that to CARBON_HOME/repository/deployment/server/eventstreams - Create publishers for the created stream and deploy that to CARBON_HOME/repository/deployment/server/eventpublishers Following is a sample configuration, <?xml version="1.0" encoding="UTF-8"?> <eventPublisher name="pubTest" statistics="disable" trace="disable" xmlns=" http://wso2.org/carbon/eventpublisher"> <from streamName="streamTest" version="1.0.0"/> <mapping customMapping="disable" type="wso2event"/> <to eventAdapterType="wso2event"> <property name="username">admin</property> <property name="protocol">thrift</property> <property name="publishingMode">non-blocking</property> <property name="publishTimeout">0</property> <property name="receiverURL">tcp://localhost:7611</property> <property encrypted="true" name="password">XXXXXXXXX</property> </to> </eventPublisher> - Publish events to the created stream using org.wso2.carbon.event.stream.core.EventStreamService OSGI service. Following is a sample code snippet. Event event = new Event(); event.setTimeStamp(System.currentTimeMillis()); event.setStreamId("streamTest:1.0.0"); event.setPayloadData(new Object[]{data}); eventStreamService.publish(event); Please note that Event Publisher Aggregate feature is not yet included in carbon feature repo. It will be available with the immediate analytics feature release. [1] https://github.com/wso2/carbon-analytics-common/tree/master/features/event-publisher/org.wso2.carbon.event.publisher.aggregate.feature Thanks, Malith -- Malith Dhanushka Senior Software Engineer - Data Technologies *WSO2, Inc. : wso2.com <http://wso2.com/>* *Mobile* : +94 716 506 693
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
