-
Notifications
You must be signed in to change notification settings - Fork 0
QFJ Storage
For the storing,QFJ will store outgoing message to some place. For FIX session, the outgoing messages are required on sequence gap.
note: Storage is a different aspect with Logging. Storage is the storing of the outbound sequence numbers, and outbound messages. note: only outbound messages are stored.The outbound messages are used on sequence gap, if peer request resend(note: admin meesages will be skipped). From the source code, you can find that the MessageStore::set(int sequence, String message) is only invoked while sending. The JdbcLogOutgoingTable is for QFJ Logging, rather than Storage.
Controlled by StoreFactory + related configuration properties. StoreFactory is required when you setup QFJ Initiator and Acceptor. It support file : FileStoreFactory jdbc: JDBCStoreFactory
PersistMessages=Y(default). or N note: if it is N, the sequence gap will only trigger GAP-FILL, without sending any application message if any.
| attribute | description | value | default |
|---|---|---|---|
| PersistMessages | If set to N, no messages will be persisted. This will force QFJ to always send GapFills instead of resending messages. Use this if you know you never want to resend a message. Useful for market data streams. | Y/N | Y |
QFJ support several StoreFactory, e.g. FileStoryFactory, JDBCStoreFactory. You can also setup your own StoreFactory, which should NOT be complex.
It is straight forward for the source code level. You can find FileStoreFactory from the tutorial source code, e.g. begin.FirstQFJClient.
You should also check the configuration entries of related StoreFactory.
Not required, since the filestore files will be cleaned on each session reset. it is ok for the cleaning on each session reset, since the messages are printed via LogFactory. for TCM(another FIX engine), it will save history store files.
note: if you hope to save the messge history, you should check the Logging functionality. note: for JDBCStoreFactory, it is saved in database. You could manually arhive history messages in database accordingly.
https://www.quickfixj.org/usermanual/1.6.4//usage/configuration.html#Storage