FIX Protocol Support for Netty
This API is intended to replace well known QuickFIX/J in high-frequency trading scenarios.
The API has a number of limitations, so it may be not suitable for any FIX application.
Currently fixio can beat QuickFix performance in simple scenario. See performance comparison.
mvn clean install
<dependency>
<groupId>kpavlov.fixio</groupId>
<artifactId>core</artifactId>
<version>1.2</version>
</dependency>
You'll also need a slf4j API implementation at runtime, so please add appropriate dependency, e.g.:
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.25</version>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
You may find working example of client and server applications in module "examples".
I recommend running server with Concurrent Mark Sweep Collector enabled: -XX:+UseConcMarkSweepGC
and increased Survivor spaces (-XX:SurvivorRatio=4
).
To create a simple FIX client you need to:
Implement FixApplication. You may extend FixApplicationAdapter as a quick start.
Create an instance of FixClient and initialize if with FixApplication you've just created and classpath reference to FIX session settings property file.
Invoke FixClient.connect(host, port)
to initiate connection.
Method connect(...)
returns a ChannelFeature which which will be notified when a channel is closed,
so you may invoke the method sync()
on it if you wish to wait for connection to be closed.
FixApplication app = new FixApplicationAdapter();
client = new FixClient(app);
// set settings file location related to classpath
client.setSettingsResource("/client.properties");
// connect to specified host and port
ChannelFeature closeFeature = client.connect("localhost", 10201);
// wait until FIX Session is closed
closeFeature.sync();
// Shutdown FIX client
client.disconnect();
You may set a property ssl=true
in client.properties
file.
Or configure FixSessionSettingsProvider
by hand. See FixSessionSettingsProvider.Params.SSL
.
You may find more information in User Guide and Wiki pages.