The BAM mediator captures data events from the ESB mediation sequences and sends them to the WSO2 Business Activity Monitor server via its Thrift API. This API uses a binary protocol and enables fast data transmission between the ESB and BAM server.
When using data publisher API to publish data in a periodic manner to WSO2 BAM/CEP, the eviction time and eviction idle time for the connections should be higher than the periodic interval. This is required to re-use the created socket connections from the pool, avoiding closure of it and creation of new connections. The default eviction period is 5.5 seconds (5500 milliseconds). If you are publishing events in a periodic interval as more than 5.5s, you need to tune the<secureEvictionTimePeriod>
parameter accordingly, in the <PRODUCT_HOME>/repository/conf/data-bridge/thrift-agent-config.xml
file of the agent in the client side, by increasing this default value.
For more information on BAM, see the BAM documentation.
Syntax
<bam xmlns="http://ws.apache.org/ns/synapse"> <serverProfile name="BAM Server Profile 1"> <streamConfig name="Test Stream" version="1.0.0"></streamConfig> </serverProfile> </bam>
UI configuration
Before you can configure a BAM mediator, you must have configured a BAM server profile and stream. You can then add the BAM mediator to a sequence (when adding a mediator, choose Agent -> BAM) and specify the BAM server profile and stream you want to use to start capturing and sending data events to the BAM server. Be sure to enable statistics on the sequence to start collecting the data.
The following properties can be configured for the BAM mediator.
Server Profile: The BAM server profile that contains the transport and credential data required to connect to the BAM Thrift server.
Stream Name: The stream used to identify the data to be extracted from the configuration context of the mediation sequence.
Stream Version: The version of the stream used.
Example
See Sending Messages to ESB in the BAM documentation for an example.