This post demonstrate how we can integrate both WSO2 BAM and WSO2 CEP and run them as a single instance.
To integrate both WSO2 BAM and WSO2 CEP we need to download BAM and install the CEP features form the WSO2 p2repo. Here I have used WSO2 BAM 2.2.0 and 4.0.7 p2repo. Follow the wiki link to get to know how to install new features to existing products.
Testing the installation.
To test the instillation add broker-manager-config.xml to repository/conf/, and add axis2_client.xml to repository/conf/axis2/.
Here axis2_client.xml has the email sender information, and I'm using a demo email account for this.
Then create a directory called 'cepbuckets' in repository/deployment/server/ and add bam-cep-kpi-analyzer.xml there.
In bam-cep-kpi-analyzer.xml, you will be able to find a line
Now if you run the KIP-analyser sample of BAM all the events that have totalPrice>350000 and quantity>3 will be notified to the user.
To integrate both WSO2 BAM and WSO2 CEP we need to download BAM and install the CEP features form the WSO2 p2repo. Here I have used WSO2 BAM 2.2.0 and 4.0.7 p2repo. Follow the wiki link to get to know how to install new features to existing products.
Testing the installation.
To test the instillation add broker-manager-config.xml to repository/conf/, and add axis2_client.xml to repository/conf/axis2/.
Here axis2_client.xml has the email sender information, and I'm using a demo email account for this.
Then create a directory called 'cepbuckets' in repository/deployment/server/ and add bam-cep-kpi-analyzer.xml there.
In bam-cep-kpi-analyzer.xml, you will be able to find a line
<cep:output brokerName="emailBroker" topic="wso2cep.demo@gmail.com/Phone Purchase Notification">Change "wso2cep.demo@gmail.com" to the endpoint use email ID, who needs to receive the notification.
Now if you run the KIP-analyser sample of BAM all the events that have totalPrice>350000 and quantity>3 will be notified to the user.
In WSO2BAM do not change port offset (default port offset is 0), in WSO2BPS set port offset as 1 and in WSO2CEP set port offset as 2.
ReplyDeleteIn order to change the port offset go to, [wso2-server-home-location]/repository/conf/carbon.xml file and change the 0 as required. If you have been interested just click to Get More Info.
Chris,
ReplyDeletewhen I using wso2 cep, if I try to persist the middle calculation result, then lots of key words cannot be used, like "window.time, avg, sum, group by having"
This configuration is:
0
If I change "0" to other number, like "5", then following expression will cause CEP parsing failure
from singleEvent#window.time(60000)
insert into outSingleEvent
symbol, avg(price) as averagePrice, sum(price) as sumPrice
group by symbol
having symbol=='112'
The error message is
[2013-09-02 09:44:31,353] INFO {org.wso2.carbon.cep.siddhi.persistence.CasandraPersistenceStore} - found revision 1377849096435_SingleEventStream
[2013-09-02 09:44:31,368] ERROR {org.wso2.carbon.cep.core.BucketDeployer} - wrong configuration provided for adding SingleEventStream.xml
org.wso2.carbon.cep.core.exception.CEPConfigurationException: Error in initializing Siddhi backend Runtime,org.wso2.siddhi.core.query.projector.attribute.handler.avg.AvgOutputAttributeProcessorDouble
cannot be cast to java.util.Map
at org.wso2.carbon.cep.core.internal.CEPBucket.init(CEPBucket.java:109)
at org.wso2.carbon.cep.core.internal.CEPService.deployBucket(CEPService.java:213)
... at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:371)
at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:59)
at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:67)
at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.runAxisDeployment(CarbonDeploymentSchedulerTask.java:67)
at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.java:112)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassCastException: org.wso2.siddhi.core.query.projector.attribute.handler.avg.AvgOutputAttributeProcessorDouble cannot be cast to java.util.Map
at org.wso2.siddhi.core.query.projector.attribute.processor.GroupByAttributeAggregatorProcessor.restoreState(GroupByAttributeAggregatorProcessor.java:53)
at org.wso2.siddhi.core.query.projector.attribute.processor.AbstractAggregationAttributeProcessor.load(AbstractAggregationAttributeProcessor.java:88)
at org.wso2.siddhi.core.persistence.PersistenceService.restoreRevision(PersistenceService.java:79)
at org.wso2.siddhi.core.persistence.PersistenceService.restoreLastRevision(PersistenceService.java:104)
...
... 21 more
[2013-09-02 09:44:31,372] INFO {org.apache.axis2.deployment.DeploymentEngine} - org.apache.axis2.deployment.DeploymentException: wrong configuration provided for adding SingleEventStream.xml
Thanks! I found lots of useful information here.
ReplyDeleteUseful information shared..I am very happy to read this article :)
ReplyDeleteBuy essay.
I think this information can help everyone. Get More Info here.
ReplyDeleteWell, I think I still have a lot of to learn. I Get More Info here.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteI still can not find how to do it, can someone help me? Get More Info
ReplyDeleteOnline educational sources are idea for getting highest marks in your examinations because in this way you can best paper writing service where highly professional writers can help you.
ReplyDeleteThis article is really nice! My brother would like this article! He is a programmer=) And I am essay writer. i earn money by writing essays for everyone. I am working at
ReplyDeletebest custom essay service - called best-essays-writers.com. If you need essay - contact to our custom support and do your purchase.
Great blog! Yahoo. It is very interesting! Thanks for sharing! Geography Coursework
ReplyDeleteHello, do you want to know how to help yourself to be the best student and have a lot of free time! If you have a lot of friends, if you want to save your time, if you need a help in such home tasks, I want to advice the best way in such tasks! It is http://custom-writing.net the best link for you and your best friends!
ReplyDeleteNice post!Short and informative as I like,thanks for sharing!You can also try http://advanced-writer.com if you want get your education on the next level.
ReplyDeleteThanks for this info,interesting post.Everybody who have writing problems can ask for help here essays-shark.net and get rid of all difficulties with one click
ReplyDeleteHi to all! Super post and thanks for sharing! Academic life is ful of challenges! if you want to be successful in your studies use this site www.essay-mania.com.
ReplyDeleteHello friends! I don't know almost anything about WSO2 BAM & WSO2 CEP .. If you can then write more about it. Sometimes we are lack of time but if I need to write smth I always use this source www.papers-writings.com where I used to order all needed writings of any type.
ReplyDeleteThank you for posting so useful piece of information. Keep on working. All students that have troubles with academic paper writing are welcome to www.academic-writings.com. The team of professional writers will do a superb-quality and plagiarism free academic paper.
ReplyDeleteHi, every one!! I think you agree with me that all student in every time, have difficulties with they essay! And this, true writing essay can be a little difficult, when you do that yourself! This why if you not enough time on this you can visit here http://essay-professors.com and order all you assignments here!
ReplyDeleteThank tou
ReplyDeleteEssay writing services available online!
ReplyDeleteThanks for this piece of information, it is very helpful in my work. Being persistent and hard-working is really very important if one wants to get ahead. Day after day training and refusing bad habits are definitely the nice keys to improve your skills and achieve success. Enter Grand-Essays Writing Service if you want to succeed in top quality papers writing.
ReplyDeletehttp://www.grand-essays.com/
This is a very nice post. Thanks for sharing with us. Keep it up webstagram
ReplyDelete