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
Objective: Demonstrate the capability of switching between FIX and AMQP protocols.
- You will need the sample FIX blotter that comes with Quickfix/J (Banzai). Configure the blotter to establish sessions with Synapse.
- Configure the AMQP transport for WSO2 ESB.
Start the AMQP consumer, by switching to
samples/axis2Clientdirectory and running the consumer using the following command. Consumer will listen to the queue
QpidStockQuoteService, accept the orders and reply to the queue
- Start Banzai.
- Enable FIX transport in the Synapse
- Configure Synapse for FIX samples.
Open up the
ESB_HOME/repository/samples/synapse_sample_260.xmlfile and make sure that the
transport.fix.AcceptorConfigURLproperty points to the
fix-synapse.cfgfile you created. Once done, you can start the Synapse configuration numbered 260:
wso2esb-samples.sh -sn 260
Synapse creates a new FIX session with Banzai at this point.
- Send an order request from Banzai to Synapse. For example, Buy DELL 1000 @ MKT.
Synapse will forward the order request by binding it to a JMS message payload and sending it to the AMQP consumer. AMQP consumer will send a execution back to Banzai.
Configuring Sample FIX Applications
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.
You can pass the new configuration file as a command line parameter too, in that case you do not need to modify the
quickfixj-examples.jar. You can copy the config files from
$ESB_HOME/repository/samples/resources/fix folder to
$QFJ_HOME/etc folder. Execute the sample applications from
./banzai.sh/bat ../etc/banzai.cfg executor.sh/bat ../etc/executor.cfg.
Locate and edit the FIX configuration file of Executor to be as follows. This file is usually named
Locate and edit the FIX configuration file of Banzai to be as follows. This file is usually named
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.
Setting up FIX Transport
To run the FIX samples used in this guide, you need a local Quickfix/J (http://www.quickfixj.org) installation. Download Quickfix/J from: http://www.quickfixj.org/downloads.
To enable the FIX transport for samples, first you must deploy the Quickfix/J libraries into the
repository/components/lib directory of the ESB. Generally, the following libraries should be deployed into the ESB.
Then uncomment the FIX transport sender and FIX transport receiver configurations in the
repository/conf/axis2.xml. Simply locate and uncomment the
FIXTransportListener sample configurations. Alternatively if the FIX transport management bundle is in use, you can enable the FIX transport listener and the sender from the WSO2 ESB management console. Login to the console and navigate to " " on management menu. Scroll down to locate the sections related to the FIX transport. Simply click on the "Enable" links to enable the FIX listener and the sender.
Configuring WSO2 ESB for FIX Samples
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/samples/resources/fix folder.")
FileStorePath property in the following two files should point to two directories in your local file system. Once the samples are executed, Synapse will create FIX message stores in these two directories.
Put the following entries in a file called
Put the following entries in a file called
Configure ESB for AMQP Transport
The samples used in this guide assumes the existence of a local QPid (1.0-M2 or higher) installation properly installed and started up. You also need to copy the following client JAR files into the
repository/components/lib directory to support AMQP. These files are found in the
lib directory of the QPid installation.
To configure FIX (Quickfix/J 1.3) with AMQP (QPid-1.0-M2), copy the "sl4j" - libraries comes with QPid and ignore the "sl4j" - libraries that come with Quickfix/J.
To enable the AMQP over JMS transport, you need to uncomment the JMS transport listener configuration. To enable AMQP over JMS for ESB, the
repository/conf/axis2.xml must be updated, while to enable JMS support for the sample Axis2 server the
samples/axis2Server/repository/conf/axis2.xml file must be updated.
Locate and edit the AMQP connection settings file for the message consumer, this file is usually named
direct.properties and can be found in the
Locate and edit the AMQP connection settings file for WSO2 ESB, this file is usually named
con.properties and can be found in the