Note that WSO2 EI is shipped with the following changes to what is mentioned in this documentation :
repository/samples/directory that includes all Integration profile samples is changed to
repository/samples/resources/directory that includes all artifacts related to the Integration profile samples is changed to
This sample demonstrates how you can use WSO2 ESB to accept FIX input via the FIX transport layer and dispatch to another FIX acceptor that accept messages in a different FIX version. Here you will see how the ESB receives a FIX 4.0 messages and simply forwards it to the FIX 4.1 endpoint.
- For a list of general prerequisites, see Prerequisites to Start the ESB Samples.
- To configure the ESB to use the FIX transport, see Configure the ESB to use the FIX transport.
- You will need the two sample FIX applications (Banzai and Executor) that are provided with Quickfix/J. Configure the two applications to establish sessions with the ESB.
Add the following line to the
FIX40-synapse.xmlfile can be found in the
<EI_HOME>/samples/service-bus/resources/fixdirectory. This is a custom FIX data dictionary file that adds the tag 150 and 151 to the execution message(35=8) of FIX4.0. Make sure the
DataDictionaryproperty in the
banzai.cfgfile points to this data dictionary file.
Add the following lines to
executor.cfg, which is the Executor configuration file:
- Start Banzai and Executor using the custom configuration files.
- You need to use two custom configuration files for the ESB in this sample. The two custom configuration files can be found in the <
EI_HOME>/samples/service-bus/resources/fixdirectory. The two files are
synapse-sender-m.cfg. You need to point your ESB configuration to these two files (this is already done in the provided
synapse_sample_261.xmlfile) or you should create copies of them and point the ESB configuration to the copies. In either case, make sure that the properties
FileLogPathin the two files point to valid locations in your local file system.
Open the <
EI_HOME>/samples/service-bus/synapse_sample_261.xmlfile and make sure that the
transport.fix.AcceptorConfigURLproperty points to the
fix-synapse-m40.cfgfile and the
transport.fix.InitiatorConfigURLproperty points to the
The ESB creates a new FIX session with Banzai at this point.
Building the sample
The XML configuration for this sample is as follows:
This configuration file
synapse_sample_261.xml is available in the
To build the sample
Start the ESB with the sample 261 configuration. For instructions on starting a sample ESB configuration, see Starting the ESB with a sample configuration.
The operation log keeps running until the server starts, which usually takes several seconds. Wait until the server has fully booted up and displays a message similar to "WSO2 Carbon started in n seconds."
Executing the sample
Send an order request from Banzai to the ESB. For example, Buy DELL 1000 @ MKT.
Analyzing the output
You will see that the ESB forwards the FIX4.0 order request to the Executor that accepts FIX4.1 messages, and that the Executor processes the request and sends a response back to Banzai.