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, but the same steps apply to any server with a listening Thrift port, such as WSO2 CEP.

Installing BAM Mediator Aggregate Feature

  1. Download WSO2 ESB version 4.5.x or later from http://wso2.com/products/enterprise-service-bus. Since BAM Mediator Aggregate feature is available by default from ESB 4.6.0 onwards, you do not have to install it separately if you use a newer ESB version.
  2. Since both ESB and BAM servers are run concurrently, you must change the default port of one server to avoid any port conflicts. To change the port of ESB, apply an offset in <ESB_HOME>/repository/conf/carbon.xml file. For example,

    Code Block
    languagehtml/xml
    <!-- Ports offset. This entry will set the value of the ports defined below to the define value + Offset. e.g. Offset=2 and HTTPS port=9443 will set the effective HTTPS port to 9445-->
    <Offset>2</Offset>
  3. Start the WSO2 ESB server as follows:
    • on Linux, run <ESB_HOME>/bin/wso2server.sh
    • on MS Windows, run <ESB_HOME>/bin/wso2server.bat

  4. After starting the server, log in to the ESB's management console and select Configure -> Features -> Repository Management menu.
  5. Add a new P2 repository using either a URL or from a file system. For more information on adding a P2 feature repository, see Managing the Feature Repository.
  6. Once done, navigate to Available Features tab and select the repository added in the previous step.
  7. Click Find Features button. It can take a while to list out all the available features in the feature repository. Once listed, select BAM Mediator Aggregate feature. If you can't see this feature, retry with one of the following suggestions:

    • Deselect the Group features by category check box and then click Find Features button again.
    • Try adding a more recent P2 repository. It is possible the one you have is deprecated.
    • Check for the feature in the Installed Features tab.
  8. Once the feature is selected, click Install and proceed with the installation. For more information on feature installation, see Installing and Managing Features.
  9. Once the installation is completed, restart the WSO2 ESB.

...

  1. Navigate to the ESB management console and select Configure -> BAM -> Server Profile menu.
  2. If there are no existing profiles, add one using the Add Profile link. If there are existing profiles, you can edit them using the Edit Profile link.
  3. Enter the profile information in the page that opens. For example,Some of the fields are described below:

    • Server Credential: admin/admin by default
    • Server Transport: Thrift as the default Protocol
    • Enable Load Balancer: Enable if want to load balance with Thrift from the client side to several hosts. Then enter comma separated connection URLs of hosts as URL Set. e.g.: tcp://10.200.3.218:7611, tcp://10.100.3.97:7611. refer more details on using load balancing publishing in this page.
    • Enable Security: If message confidentiality is required from ESB server to BAM server, select this option.
    • IP Address: IP of the BAM server's Thrift server. By default, it is the IP address of the localhost.
    • Receiver Port:  If security is not enabled, this option will have to be given. Enter 7611 by default, which is the Thrift server port.
    • Authentication Port: Port number is 100 times greater than the Receiver Port, if the latter exists. Default Authentication Port number is 7711.
    • Test Server button: Using this, availability of the BAM server can be tested for the given IP Address and the Authentication Port.
  4. Define a set of stream configurations. For example,
    Each stream must have the following defined:

    • Name: Stream Name can be any string with alpha-numeric characters.
    • Version: Stream Version distinguishes different streams with the same Stream Name. Default version should be 1.0.0.
    • Nickname: This is a user-preferred nick name to the Stream Name in alpha-numeric characters.
    • Description: A description about the particular stream defined by Stream Name/Stream Version pair. Description should also consist of alpha-numeric characters.
    • Dump header/Dump body, options: If you want to record SOAP header or SOAP body of messages respectively. 
    • Stream Properties: You can extract several types of properties from the message. Properties are divided into two as Value and Expression.
      • Value: A constant alpha-numeric string value entered to Value field is set as the property.
      • Expression: The given expression in Value field is considered as an expression and executed on the message to get the property. XPath properties and functions available in ESB are valid in the expression. (Note : At the moment, there is no way to add namespaces to xpath expressions which is to be completed in future. It is given in JIRA https://wso2.org/jira/browse/BAM-539 . As a workaround, you can use Property Mediator in ESB, to get the xpath and add it to the message context as a property which can then be captured from the BAM mediator using the get-property expression.)
      • Type drop down list: The required type to be converted in which the property should be sent via Thrift
       
    At the time you define the mediator definition, you can select a stream from the ones you define here.
  5. After Stream Payload and Stream Properties are added/edited, click Update to reflect changes in the specific stream configuration.
  6. Once all configurations are made to the BAM Server Profile, click Save.
  7. Click the BAM Server Profile link at the top of the page to see the new profiles. Similarly, you can add any number of server profiles and unique stream configurations under one BAM server profile.

...