QuickFIX/J mixing two different versions

One way to do this is to customize the Data Dictionary FIX4.4.xml and replace the fields in it that can sometimes be in FIX 5.0 format. E.g. by copying them from FIX5.0.xml and placing them in the proper messages in FIX4.4.xml. Please see the QuickFIX/J user FAQ for more details.

From the QuickFIX/J user manual:

The simplest customization is to just modify one or more data dictionaries (e.g., FIX44.xml) and rebuild QFJ. This allows you to add custom fields, define new messages not included in the specification, change whether fields are required or optional, and so on.

Afterwards rebuild QuickFIX/J to reflect these changes.


Instructions for rebuilding QuickFIX/J version 1.5.x

You’ll need ant installed.

QF/J generates the source from the DDs in core/src/main/resources. Make a back up of the one you’re going to alter, and then alter it however you need to.

Then rebuild as follows:

  1. ant jar
  2. You will be prompted for a release number; this just determines the suffix given to the jar names. Enter whatever you want.
  3. Wait for build to finish
  4. Find your brand-new QF/J jars in core/target/

A little further in the FAQ (how do I rebuild QF/J) the call to ANT is more specific:

The version argument is just a filename suffix. The skip.jalopy argument is optional and will skip some time-consuming doc generation.

ant version=SOME_STRING -Dskip.jalopy=true clean jar


Instructions for rebuilding QuickFIX/J version 1.6.x

For version 1.6.0 building is done with Maven.

If you are building the code from the command line you’ll need to download and install Maven (version 3.2.5 or newer). If you are building from an IDE, Maven is usually included. Building from source requires Java 6+.

  1. Check out the code from GitHub. See the instructions at GitHub for more details on cloning the repository.
  2. Change directory to the top-level directory of the checked out code. You should see a pom.xml file.
  3. Run mvn package to build the QuickFIX/J and examples jar files. This will also generate all the FIX message-related code for the various FIX versions.
  4. There is an option for the code generator to use BigDecimal instead of double for fields like price and quantity. To enable this feature pass a -Dgenerator.decimal option on the command line when running the generate.code target.

There are various command-line switches you can pass to ant to modify the produced behavior:

Switch                  Description                             Default
-Dgenerator.decimal     Generate BigDecimal vs doubles fields   false
-DskipAT=true           Skip running of acceptance test suite.  false

For example, in order to generate fields with BigDecimals and skip acceptance tests:

mvn test -Dgenerator.decimal=true -DskipAT=true 

Leave a Comment