FIX Store Gateway (GW)
This article describes the configuration of the FIX Store Gateway .
For maximum performance, the Ember FIX Order Entry Gateway only supports transient FIX sessions. To synchronize the state of orders after an unplanned disconnect, FIX users can use OrderStatusRequest (35=H)
messages or a separate FIX Drop Copy line (the latter supports persistent FIX sessions). However, in some special cases, third-party integration may require the use of persistent order entry FIX sessions, which are supported by the FIX Store Gateway.
While the FIX Store Gateway supports the full scope of FIX Resend requests with a persistent message store, there are a number of disadvantages you should be aware of before using this service:
- The FIX Store GW has slightly higher latency for order event propagation (see the design documentation for details).
- It always runs as a separate service, requiring additional configuration and introducing some operational overhead.
- FIX Store GW sessions are not visible in Ember Monitor.
- The FIX Store GW is not designed to handle a large number of FIX sessions (while the main FIX Gateway can handle hundreds, the FIX Store Gateway is intended for fewer than ten).
- The FIX Store GW currently supports only FIX 4.4 (the main FIX Gateway also supports FIX 5.0 SP2).
- It only supports a basic form of authentication (using the
Password (554)
field in the LOGON message). - FIX request transformation plugins and customizable Trader ID resolution methods are not yet supported.
The FIX Store Gateway only supports the Order Entry FIX API. We believe it does not make sense to support resend functionality for any FIX Market Data dissemination gateway.
FIX Dialect
Under the hood, the FIX Store GW uses the same FIX encoders and decoders as the main Ember FIX Gateway and therefore shares the same FIX dialect described here. A few minor differences related to the FIX protocol include:
- FIX Resend requests are fulfilled from the persistent message store (rather than via the "Gap Fill" API used by the main gateway).
- The FIX Store GW requires a FIX session schedule that allows periodic truncation of the message store.
Design
The following diagram illustrates FIX Store GW design.
- The FIX Store GW runs in a separate process/container from the main Ember service.
- It uses the TCP-based Ember Message Bus API to transmit order requests.
- It reads order events from the Ember journal and maintains a journal fence to prevent the journal compactor from deleting untransmitted order events in the abnormal case of prolonged FIX Store GW downtime.
Configuration
Configuration of Ember FIX Store GW is similar to Ember FIX Drop Copy.
Here is an example of configuration stanza from ember.conf
:
fixStoreGateway: {
CLIENT1 {
settings {
targetCompId = TCLIENT1
port = 5001
schedule = {
zoneId = "America/New_York"
intervals = [
{
startDay = SUNDAY
startTime = "17:30:00" #"17:55:00"
endDay = MONDAY
endTime = "17:00:00"
}
{
startDay = MONDAY
startTime = "17:30:00" #"17:55:00"
endDay = TUESDAY
endTime = "17:00:00"
}
{
startDay = TUESDAY
startTime = "17:30:00" #"17:55:00"
endDay = WEDNESDAY
endTime = "17:00:00"
}
{
startDay = WEDNESDAY
startTime = "17:30:00" #"17:55:00"
endDay = THURSDAY
endTime = "17:00:00"
}
{
startDay = THURSDAY
startTime = "17:30:00" #"17:55:00"
endDay = FRIDAY
endTime = "17:00:00"
}
]
}
}
}
CLIENT2 {
settings {
targetCompId = TCLIENT2
port = 5002
...
}
}
...
}
You can see that each FIX client session connecting to FIX Store GW should have unique TargetCompId(56) and port.
You can HOCON template to define similar parts of FIX session configuration - like FIX session schedule.
Run time
To launch FIX Store GW use ember container with redefined entrypoint pointing to /opt/deltix/ember/bin/fix-store-gw
.
FIX Store GW need EMBER_HOME and EMBER_WORK environment variable shared with main Ember service. This allows FIX Store GW to read own configuration and access Ember journal.
This service need moderate amount of CPU and memory (numbers vary depending on number of FIX sessions defined and order rate).
FIX Message store files live under $EMBER_WORK/fix-store-gw
directory, where each FIX session has a sub-directory containing own message store.
FIX Store also tracks a fence file under $EMBER_WORK/journal/fence-fix-store-gw
to report currently processed journal position to Journal Compactor.