Objective: Demonstrate the capability of CBR FIX messages.
Prerequisites
- You will need the two sample FIX applications that come with Quickfix/J (Banzai and Executor). Configure the two applications to establish sessions with Synapse.
- Add the following lines to
banzai.cfg
.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<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> |
Configuring Sample FIX Applications
Anchor | ||||
---|---|---|---|---|
|
If you use a binary distribution of Quickfix/J, the two samples and their configuration files are all packed to a single JAR file called quickfixj-examples.jar
. You will have to extract the JAR file, modify the configuration files and pack them to a JAR file again under the same name.
...
The FileStorePath
property in the above two files should point to two directories in your local file system. The launcher scripts for the sample application can be found in the bin directory of Quickfix/J distribution.
Configuring WSO2 ESB for FIX Samples
Anchor | ||||
---|---|---|---|---|
|
In order to configure WSO2 ESB to run the FIX samples given in this guide, you will need to create some FIX configuration files as specified below (you can find the config files from $ESB_HOME/repository/conf/sample/resources/fix folder
).
...