Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Start Banzai and Executor using the custom config files.
  • Enable FIX transport in the Synapse axis2.xml
  • Configure Synapse for FIX samples. 
  • Open up the ESB_HOME/repository/samples/synapse_sample_262.xml file and make sure that transport.fix.AcceptorConfigURL property points to the fix-synapse.cfg file you created and transport.fix.InitiatorConfigURL points to the synapse-sender.cfg file you created. Once done, you can start the Synapse configuration numbered 262: wso2esb-samples.sh -sn 262.
Info
titleNote

Synapse creates a new FIX session with Banzai at this point.

  • Send an order request from Banzai to Synapse. For example, Buy GOOG 1000 @ MKT, Buy MSFT 3000 @ MKT, Buy SUNW 500 @ 100.20.
  • Synapse will forward the order requests with symbol "GOOG" to FIX endpoint FIX-4.0 @ localhost:19876.
  • Synapse will forward the order requests with symbol "MSFT" to FIX endpoint FIX-4.1 @ localhost:19877.
  • Synapse will not forward the orders with other symbols to any endpoint (default case has kept blank in the configuration).
Code Block
languagehtml/xml
linenumberstrue
<definitions xmlns="http://ws.apache.org/ns/synapse">
    <sequence name="CBR_SEQ">
        <in>
            <switch source="//message/body/field@id='55'">
                <case regex="GOOG">
                    <send>
                        <endpoint>
                            <address
                                uri="fix://localhost:19876?BeginString=FIX.4.0&SenderCompID=SYNAPSE&TargetCompID=EXEC" />
                        </endpoint>
                    </send>
                </case>
                <case regex="MSFT">
                    <send>
                        <endpoint>
                            <address
                                uri="fix://localhost:19877?BeginString=FIX.4.1&SenderCompID=SYNAPSE&TargetCompID=EXEC" />
                        </endpoint>
                    </send>
                </case>
                <default></default>
            </switch>
        </in>
        <out>
            <send />
        </out>
    </sequence>
    <proxy name="FIXProxy" transports="fix">
        <target inSequence="CBR_SEQ" />
        <parameter name="transport.fix.AcceptorConfigURL">
            file:repository/conf/sample/resources/fix/fix-synapse.cfg
        </parameter>
        <parameter name="transport.fix.AcceptorMessageStore">
            file
        </parameter>
        <parameter name="transport.fix.InitiatorConfigURL">
            file:repository/conf/sample/resources/fix/synapse-sender.cfg
        </parameter>
        <parameter name="transport.fix.InitiatorMessageStore">
            file
        </parameter>
    </proxy>
</definitions>

...