Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Open another terminal and switch to <CEP_HOME>/samples/consumers/log-service jms and run the below command. This  This will build the sample axis2 sample log service and deploy in the axis2 repository that is relevant to the specified sample. After proper deployment, the web service will be able to receive messages sent from the CEP server. Below you can see the logs in CEP server when LogService.aar is deploying.jms consumer and execute it. Do not close this terminal as it is required to keep the server running in order to receive events and view them.

    Info

    ant queueConsumer -DsampleNo=0102

    Image Removed

  2. Then, We need to Configure the LogService in order to receive the output events emitted by the CEP server under the PurchaseOrders topic. Here we will be creating PurchaseOrders topic in the local broker and subscribe  LogService on that topic.
  3. Click on "Add" menu item under "Topics" Menu in Manage section of the left panel. Then Specify the topic name in the topic input text box, in this case topic name is : "PredictedStockQuotes" (the output topic) and click on 'Add Topic' button. This will add the topic to the server and you will be directed to the Topic Browser page.
    Image Removed
  4. Once you click on the topic in topic browser page you will be able see four links as in the bellow image. Click in the subscribe link and you will be directed to Subscribe page.
    Image Removed
  5. Create subscription with following details. Once you are done click the Subscribe button.
    Image Removed
  6. Now subscription to the specific topic is done. Now we can send events to CEP. 

    Dqueue=DelayedFlightStats (Since we are sending events from CEP to a topic called DelayedFlightStats

  7. From another terminal switch to <CEP_HOME>/samples/producers/twitterflight-feedstats/ and run ant from there. This will build and run the wso2Event jms producer which will send some twitter feed flight stats data to the CEP server. From this terminal, you will be able to view the details of the events sent.

    Info
    titleNote

    To configure host, port, username, password and No. of events use -Dhost=xxxx -Dport=xxxx -Dusername=xxxx -Dpassword=xxxx -Devents=xxqueue use -Dqueue=xxxx

    For example : ant -Dqueue=FlightStats

    Image Removed

    From another terminal switch to <CEP_HOME>/samples/producers/stock-quote/ and run ant from there. This will build and run the jms producer which will send some sample stock quotes information to the CEP server. From this terminalImage Added

  8. Once the step 2 is done successfully, you will be able to view the details of the events sent. Below is the sample screen shot when sending events.
    Image Removedsee the output events received from the CEP via the terminal opened in step 1.

  9. Below is the console output in the CEP server when events are received after processing. Image RemovedfdfImage Added