-
Notifications
You must be signed in to change notification settings - Fork 121
Multiple FIX Versions
NB: This support is currently experimental and is only located on the multiple-fix-versions branch
Artio instances can support multiple versions of the FIX protocol concurrently within the same instance. This is only supported as an initiator (client) - using Artio as a FIX acceptor (server) currently only supports using one, configurable, version of FIX for a given instance. This feature is useful for buy-side users who wish to trade on multiple different venues that use different FIX versions.
Multiple concurrent FIX versions require changes to the way that you generate codecs, how you initiate Sessions, and potentially to session customisation.
The CodecGenerationTool
needs to be run for different FIX protocol version that you want to support. You must specify a parent package that the codecs will be generated in by using the fix.codecs.parent_package
system property and these packages should be different to each other. The examples below show how to set this package to uk.co.real_logic.artio.fixt
.
java -Dfix.codecs.parent_package=uk.co.real_logic.artio.fixt -cp "artio-codecs/build/libs/artio-codecs-${ARTIO-VERSION}.jar" \
uk.co.real_logic.artio.dictionary.CodecGenerationTool \
/path/to/generated-src/directory \
src/main/resources/your_fix_dictionary_file.xml
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
<phase>generate-sources</phase>
</execution>
</executions>
<configuration>
<mainClass>uk.co.real_logic.artio.dictionary.CodecGenerationTool</mainClass>
<arguments>
<argument>${project.build.directory}/generated-sources/java</argument>
<argument>src/main/resources/your_fix_dictionary_file.xml</argument>
</arguments>
<systemProperties>
<systemProperty>
<key>fix.codecs.parent_package</key>
<value>uk.co.real_logic.artio.fixt</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
task generateCodecs(type: JavaExec) {
main = 'uk.co.real_logic.artio.dictionary.CodecGenerationTool'
classpath = sourceSets.main.runtimeClasspath
systemProperty("fix.codecs.parent_package", "uk.co.real_logic.artio.fixt")
args = ['/path/to/generated-src/directory', 'src/main/resources/your_fix_dictionary_file.xml']
outputs.dir '/path/to/generated-src/directory'
}