Use of Arbitrary key value pairs on Complex Event Processor

Recently I tested a release of the product WSO2 Complex Event Processor which has a new feature of allowing Arbitrary Key value.

Introduction: Complex event processor is an open source product under the Apache Software License v2.0. The basic concept of this product is to generate new event streams from multiple other events. These events are processed as queries to the CEP Bucket and brokers  are used to send the output of the queries to the CEP engine to enable the engine to process the events.
The CEP Uses outputs a part of the CEP engine to generate outputs triggered by events. Following are the available Output Mappings.

The output mappings are
New Feature

The new feature allowed arbitrary values to be passed to an existing stream of information. The below steps give the procedure followed for the verification of the new functionality


First, we need to start the server, to do that go to the installation location at wso2cep-2.1.0/bin and give the command ./wso2server.sh



Once the server is started, the console will be shown as



Once the server has started we need to gain access to the system. Select your browser and type the user as shown on the console. The default login being admin/admin



Next, we need to create a bucket. A CEP Bucket is an instance of CEP Runtime Engine and it is the base component of WSO2 Complex Event Processor. All processing of received events and triggering of new events happens through these buckets. On the management console. To create the bucket, go to the CEP Bucket and click on the add option which will open up the screen to create a bucket.





We also need to create a broker for for handling the connection between the CEP engine and the Event Sources. These are different types of brokers as listed below.
For this scenario, we will be  using an Agent broker. An Agent broker helps to receive events over Thrift using TCP, SSL, HTTP, and HTTPS, and it can also receive JSON events via HTTP and HTTPS.   To create the broker, move to the configuration menu and select the option to create a new broker as below



Once the system is configured to run the scenario we then need to access the  PhoneRetailAgent.java within wso2cep-2.1.0/samples/cep-samples/src/org/wso2/carbon/cep/sample/agent




Within the stream we can see that buyer and seller details are not passed. The new functionality will help these required data to be passed as arbitrary values to the stream. To achieve this I created a hash map and passed the values to the stream as shown below in the code sample.



To test the new functionality first we need to go to the location : wso2cep-2.1.0/samples/cep-samples and execute the command ant agentTestServer to start the agent server.

To verify the output we run the client as ant agentPhoneRetailClient



As the above screen shows the  arbitrary key-values passed from the hash map a sent with the stream data



Comments

  1. Use Of Arbitrary Key Value Pairs On Complex Event Processor >>>>> Download Now

    >>>>> Download Full

    Use Of Arbitrary Key Value Pairs On Complex Event Processor >>>>> Download LINK

    >>>>> Download Now

    Use Of Arbitrary Key Value Pairs On Complex Event Processor >>>>> Download Full

    >>>>> Download LINK Wp

    ReplyDelete

Post a Comment