This is the latest release in the 6.x.x family. For EI 7.0.0, click here.

All docs This doc
Skip to end of metadata
Go to start of metadata

Note that WSO2 EI is shipped with the following changes to what is mentioned in this documentation:

  • <PRODUCT_HOME>/repository/samples/ directory that includes all Integration profile samples is changed to <EI_HOME>/samples/service-bus/.
  • <PRODUCT_HOME>/repository/samples/resources/ directory that includes all artifacts related to the Integration profile samples is changed to <EI_HOME>/samples/service-bus/resources/.

Objective: Demonstrate on CBR a message with binary payload

<definitions xmlns=""

    <proxy name="JMSBinaryProxy" transports="jms">
        <target inSequence="BINARY_CBR_SEQ"/>

    <sequence name="BINARY_CBR_SEQ">
            <log level="full"/>
            <property action="set" name="OUT_ONLY" value="true"/>
            <class name="samples.mediators.BinaryExtractMediator">
                <property name="offset" value="11"/>
                <property name="length" value="4"/>
                <property name="variableName" value="symbol"/>
                <property name="binaryEncoding" value="utf-8"/>
            <log level="custom">
                <property name="symbol" expression="get-property('symbol')"/>
            <switch source="get-property('symbol')">
                <case regex="GOOG">
                <case regex="MSFT">



  • Make sure the synapse-samples-1.0.jar is in your class path (by default this jar is placed in the lib directory when installing Synapse)
  • Configure the JMS transport using ActiveMQ as described in Setting Up the ESB Samples.
  • Create the above configuration and deploy it in the WSO2 EI profile, see Working with WSO2 Integration Studio.
  • Start the sample Axis2 server and deploy the SimpleStockQuoteService.

In this configuration, a proxy has configured to accept incoming JMS messages. JMS messages contains a binary payload. User configure the offset, length, binary encoding of the text literal that it need to use for CBR. And a variable name to set the decoded value as a property. Configuration simply route the messages based on the text to different endpoints.
A JMS producer and two instances of a consumer used to demonstrate the CBR functionality.

Now run the first consumer using the following command.

ant mddconsumer -Djms_topic=mdd.MSFT

Now run the second consumer using the following command.

ant mddconsumer -Djms_topic=mdd.GOOG

So, now both consumers are ready to listen the topic. Run the market data producer to genenrate market data for symbol 'MSFT' using the following command.

ant mddproducer -Dsymbol=MSFT

Now run the market data producer to genenrate market data for symbol 'GOOG' using the following command.

ant mddproducer -Dsymbol=GOOG

You will see the below output in the client console(s) based on the symbol.

[java]  Market data recived for symbol : topic://mdd.MSFT
[java]  Market data recived for symbol : topic://mdd.MSFT
  • No labels