Versions Compared

Key

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

...

Info

NOTE: The steps below show how to set up WSO2 BAM as the Thrift server to which WSO2 ESB sends data events. The , but the same steps apply to any other server with a listening Thrift port, such as WSO2 CEP.

Installing BAM Mediator

...

  1. Go to the ESB's management console and select Main > Axis2 Services > List menu.
  2. Click on Simple_Stock_Quote_Service_Proxy to go to its dashboard.
  3. Click Edit under category Specific Configuration and then click Next.
  4. Select option Define Inline under category Define In Sequence and then click the Create link associated with it.
  5. Click on Configuration Registry link, select [Sequence]-fault from the drop down list and click OK.
  6. Click on Add Child link on the Root, select Agent > BAM from menus.
  7. Select BAM element from the sequence tree.
  8. In the form that appears, select a Server Profile and a Stream Name from the available lists. Similarly, select a Stream Version. For example,
  9. Click Update. You can view the mediator XML generated for the BAM Mediator by selecting the switch to source view option. To go back to the design view, click switch to design view. Given below is an example how the mediator XML looks:

    Code Block
    languagehtml/xml
    <bam xmlns="http://ws.apache.org/ns/synapse">
       <serverProfile name="profile1">
          <streamConfig name="stream1" version="1.0.0" ></streamConfig>
       </serverProfile>
    </bam>

     

     
  10. Click Save, then Next and then Finish.

Now the The BAM mediator is now added to the WSDL Proxy Service proxy service named Simple_Stock_Quote_Service_Proxy.

Send messages to the ESB

At the moment all above mentioned steps should be finished to Before you test the BAM mediator, finish all steps discussed above. In this step the user can section, we send custom messages through the previously created WSDL Proxy Service WSDL proxy service created earlier and test whether they are correctly stored in the a Cassandra database. This is only an example, but the same type of steps can be followed to use the BAM mediator in the production environment.

...

steps apply in any a production scenario, using any Thrift listening port.

  1. Download and start WSO2 BAM. Be sure to use a port different to WSO2 ESB to avoid any port conflicts (at this point, WSO2 ESB must be downloaded and started).
  2. Go to <ESB_HOME>/samples/axis2Client and build the backend service with Apache Ant as follows:
    ant stockquote -Daddurl=https://localhost:8244/services/Simple_Stock_Quote_Service_Proxy -Dmode=fullquote -Dsymbol=testString
    

    (Here NOTE: addurl value should must be given from the https HTTPS endpoint located in Simple_Stock_Quote_Service_Proxy's service dashboard that can be navigated by going . To see the dashboard, go to the ESB management console Main→Web Services→List from side panel and selecting , select Main > Web Services > List menu and select Simple_Stock_Quote_Service_Proxy. Any Use a preferred string can be used instead of the testString for symbol .


    Now The BAM mediator in the proxy service, Simple_Stock_Quote_Service_Proxy should must have dumped data extracted from the ESB to the key-space, EVENT_KS in the Cassandra database, with column family name same as the Stream Name. Data in the Cassandra database can be seen from the Cassandra Explorer in the BAM server.

...