Process
About the FixProcess Class
FixProcess is an important singleton class in QXFIX Engine that enables you to:
- Provide a FIX session persistence layer for your application
- Customize the copyright information displayed in your application
- Customize date format and log file name format (when using File Logger)
- Interface your application with external systems for real-time message analysis
For further information or customization queries, contact:
qxfix@QuantXpress.com
FAQs
How do I provide a FIX session persistence layer to my Initiator or Acceptor application?
To provide a FIX session persistence layer, initialize the FixProcess class once.
QXFIX Engine supports both:
- File-based persistence
- Database persistence
This single instance works across the entire application.
Example
// Create a FIX Persistence connection string
string dbName = "QXFix";
string hostName = Dns.GetHostName();
string dbConnectionString = string.Format(
"Data Source={0};Initial Catalog={1};Integrated Security=SSPI;Pooling=true;Min Pool Size=0;Max Pool Size=100;Connect Timeout=30",
hostName,
dbName
);
// Database persistence (MSSQL)
FixDBConfig dbConfig = new FixDBConfig(eDBProvider.SqlServer, dbConnectionString);
FixProcess.Instance.Init(dbConfig);
// File-based persistence
FixDBConfig fileConfig = new FixDBConfig(eDBProvider.File);
FixProcess.Instance.Init(fileConfig);
How do I customize the copyright information?
The default copyright text refers to QuantXpress Technologies.
You can override it as follows:
FixProcess.Instance.CopyRightText = "ABC Copyright...";
How do I interface with an external application for real-time message analysis?
You can attach a plugin-based Session Alert Queue Handler to FixProcess.
This allows access to:
- Inbound messages
- Outbound messages
- Errors and warnings
- Session states (logon, logout, disconnect, etc.)
For implementation details, contact:
qxfix@QuantXpress.com
How do I set the log file name format?
Default log file name format:
<SenderCompID>.<TargetCompID> [dd.MM.yyyy HH.MM.SS.fff].log
Example
- SenderCompID = Initiator1
- TargetCompID = QXAcceptor
- Time = 25 June 2008, 17:53:00.718
Output:
Initiator1.QXAcceptor [25.06.2008 17.53.00.718].log
Customization
public void SetLogFileAttributes(
LogFileSTSeparator logFileSTSeparator,
DateFormat logFileDateFormat,
DateSeparator logFileDateSeparator
)
Supported separators:
- Dot (.)
- Hash (#)
- Space ( )
- Underscore (_)
Default separator = dot (.)
Note
The separator does not apply to the date portion of the log file.
How do I set the date format and separator in log entries?
Use:
public void SetLogFileAttributes(
LogFileSTSeparator logFileSTSeparator,
eDateFormat logFileDateFormat,
DateSeparator logFileDateSeparator
)
Supported Date Formats
- ddMMyyyy
- MMddyyyy
- yyyyddMM
- yyyyMMdd
Default = ddMMyyyy
Supported Date Separators
- Hyphen (-)
- Dot (.)
- Slash (/)
- None
Default = hyphen (-)