Rajiv Patil
Rajiv Patil

Reputation: 129

Distributed WSO2 CEP

If I have a distributed CEP setup with a JMS broker as the primary input.

Now if we tell our client application to send event to Topic X, the events will be distributed to each node in the CEP cluster, as each one will be listening on same Topic X. Will this lead to duplication of results (lets say if I am counting certain data field, now since each node is receiving duplicate data, will my count be double of actual value if I have a 2 node cluster)

Can the CEP work off a JMS Queue instead of a Topic ? This way which ever node gets the event data first will consume the message off the Queue ? Does WSO2 CEP support JMS Queues ?

Upvotes: 1

Views: 464

Answers (1)

suho
suho

Reputation: 912

No, currently (CEP 2.0.1) does not have support to receive events from JMS queue. But if this is your requirement then you can write your own CEP addeptor(broker) to receive events from a queue and push that to CEP.

To create a custom broker

Create an appropriate Broker Type by extending org.wso2.carbon.broker.core.BrokerType and an appropriate Broker Type Factory by extending the org.wso2.carbon.broker.core.BrokerTypeFactory from the jar org.wso2.carbon.broker.core-4.0.5.jar

Then to configure that broker with the CEP create a file called "broker.xml" at wso2cep-2.0.1/repository/conf and add the following XML: <brokerTypes xmlns="http://wso2.org/carbon/broker"> <brokerType class="<<class reference>>" /> ... </brokerTypes>

Find a detail documentation on creating a custom broker at http://suhothayan.blogspot.com/2013/02/writing-custom-broker-for-wso2-cep.html

Upvotes: 2

Related Questions