...
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
...
- Go to the ESB's management console and select Main > Axis2 Services > List menu.
- Click on Simple_Stock_Quote_Service_Proxy to go to its dashboard.
- Click Edit under category Specific Configuration and then click Next.
- Select option Define Inline under category Define In Sequence and then click the Create link associated with it.
- Click on Configuration Registry link, select [Sequence]-fault from the drop down list and click OK.
- Click on Add Child link on the Root, select Agent > BAM from menus.
- Select BAM element from the sequence tree.
- In the form that appears, select a Server Profile and a Stream Name from the available lists. Similarly, select a Stream Version. For example,
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 language html/xml <bam xmlns="http://ws.apache.org/ns/synapse"> <serverProfile name="profile1"> <streamConfig name="stream1" version="1.0.0" ></streamConfig> </serverProfile> </bam>
- 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.
- 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).
- 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.
...