BAM Mediator is a mediator for WSO2 ESB that captures data events from the ESB mediation sequences and sends to any server with a listening Thrift port such as WSO2 BAM or WSO2 CEP servers. The Thrift port receives data events via a Thrift API. It uses a binary protocol and enables fast data transmission between the ESB and a Thrift port.
...
The following sections explain how to use the existing BAM Mediator configuration when editing a mediation sequence, using a sample scenario.
Table of Contents | ||||
---|---|---|---|---|
|
Configuring
...
server profiles and streams Anchor Configure BAM Server Profiles and Streams Configure BAM Server Profiles and Streams
Configure BAM Server Profiles and Streams | |
Configure BAM Server Profiles and Streams |
Before adding a BAM mediator to a mediator sequence, you must update the BAM mediator configurations. Configuration information is considered as a set of BAM server profiles, which contain transport and credential data required to connect to the BAM server. In each BAM server profile, you must define one or many event stream configurations. Streams contain Thrift API event stream related information like Stream Name, Stream Version etc. and the data to be extracted from the configuration context of the mediation sequence. The steps below explain this.
...
- Go to <ESB_HOME>/samples/axis2Server/src/SimpleStockQuoteService and build the backend service with Apache Ant (You must have Apache Ant installed).
- Go to <ESB_HOME>/samples/axis2Server and run the Axis2 server.
- In Linux: axis2server.sh
- In Windows: axis2server.bat
- Test whether the proxy service WSDL exists in
http://localhost:9000/services/SimpleStockQuoteService?wsdl
.
Adding a proxy service to
...
the ESB
These are the steps to create a sample WSDL Proxy Service to test the BAM mediator.
- Go to ESB management console and select Main→Web Services→Add→Proxy Service from the side panel.
- Click Based Proxy to create a new WSDL based proxy.
- Fill the form as follows:
- Insert a suitable Proxy Service Name (eg:
Simple_Stock_Quote_Service_Proxy)
- Set
http://localhost:9000/services/SimpleStockQuoteService?wsdl
as the WSDL URI - Set
SimpleStockQuoteService
as the WSDL service - Set
SimpleStockQuoteServiceHttpSoap11Endpoint
as the WSDL Port
- Insert a suitable Proxy Service Name (eg:
- Click Create.
- Click on the newly created proxy's name (Simple_Stock_Quote_Service_Proxy in this case) to go to its dashboard.
Adding
...
BAM Mediator to WSDL proxy service
After creating a sample WSDL proxy service, the user can add one or more BAM mediators to the sequence of WSDL Proxy Service as follows.
...
The BAM mediator is now added to the WSDL proxy service named Simple_Stock_Quote_Service_Proxy.
...
Sending messages to the ESB
Before you test the BAM mediator, finish all steps discussed above. In this section, we send custom messages through the WSDL proxy service created earlier and test whether they are correctly stored in a Cassandra database. This is an example, but the same steps apply in any a production scenario, using any Thrift listening port.
...