Home » Products » FF.FIX Engine » FF.FIX Engine Knowledgebase » FIX Process

FIX Process

About the FixProcess class

FixProcess is an important singleton class in FF.FIX Engine that enables you to:

  1. Provide a FIX session persistence layer for your application.
  2. Customize the copyright information that appears in your application.
  3. Customize the date format and log file name format (if you selected the File as the LoggerType value in the FIX configuration).
  4. Interface your application with any external application for analysis of real-time messages and events.

For further information on functionalities and usage of this class and your queries related to customization and interfacing, please write to infofirstfuturessoftware.com.

::FAQ::

  1. How do I provide a FIX session persistence layer to my Initiator or Acceptor application?
  2. How do I customize the copyright information to be displayed in my application?
  3. How do I interface my application with an external application for analyzing the real-time messages and events?
  4. How do I set the log file name format if I selected the File Logger option?
  5. How do I set the date format and date separator in the session log file entries?
  1. How do I provide a FIX session persistence layer to my Initiator or Acceptor application?

For providing a FIX session persistence layer to your Initiator or Acceptor application, you need to initialize the FixProcess class once.

The FF.FIX Engine flexibly supports both file and database persistence mechanism to maintain the FIX session state.
This single instance of FixProcess works for the entire application. See the following example:

//Create a FIX Persistence connection string for connecting to the database.
string dbName = "FFFix";
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);

//File based persistence
//Persistence file name is based on current FIX session sendercompID and targetcompID
FixDBConfig dbConfig = new FixDBConfig(eDBProvider.File);
FixProcess.Instance.Init(dbConfig);

//File based persistence
//Persistence file name is based on current FIX session sendercompID and targetcompID
FixDBConfig dbConfig = new FixDBConfig(eDBProvider.File);
FixProcess.Instance.Init(dbConfig);

  1. How do I customize the copyright information to be displayed in my application?

The default copyright information mentions about First Futures Software. In your application, you may overwrite this information as given below:

FixProcess.Instance.CopyRightText = "ABC Copyright...";

  1. How do I interface my application with an external application for analyzing the real-time messages and events?

One major feature of the FixProcess class is that you can attach a plug-in based Session Alert Queue Handler to it and access the real-time events (like Inbound Message, Outbound Message, Error, Warning etc) and the FIX session states (like logging, logged, logging out, logged out, disconnected etc) through an external application for analysis. For more information, please contact infofirstfuturessoftware.com.

  1. How do I set the log file name format if I selected the File Logger option?

The default format for the session log file name is:

<SenderCompID>.<TargetCompID> [dd.MM.yyyy HH.mm.ss.fff].log

For example, you opted to use the default format for the session log file name and the session log file is based on the following data:

  • SenderCompID = Initiator1
  • TargetCompID = FFAcceptor
  • The session started at 17:53:00.718 hrs on 25th June 2008

Then the default session log file name would be Initiator1.FFAcceptor [25.06.2008 17.53.00.718].log.

The FixProcess class lets you select dot (.), hash (#), space ( ) or underscore (_) as the separator between the SenderCompID and TargetCompID in the session log file name using the eLogFileSTSeparator parameter in the following method:

public void SetLogFileAttributes(eLogFileSTSeparator logFileSTSeparator, eDateFormat logFileDateFormat, eDateSeparator logFileDateSeparator)

The default value for the eLogFileSTSeparator parameter is dot (.).

Note that the eLogFileSTSeparator separator does not apply to the date that appears in the session log file name.

  1. How do I set the date format and date separator in the session log file entries?

The FixProcess class lets you select the date format and date separator in the session log file entries using the following method:

public void SetLogFileAttributes(eLogFileSTSeparator logFileSTSeparator, eDateFormat logFileDateFormat, eDateSeparator logFileDateSeparator)

The options for the eDateFormat parameter are ddMMyyyy, MMddyyyy, yyyyddMM and yyyyMMdd and its default value is ddMMyyyy. The options for the eDateSeparator parameter are hyphen (-), dot (.), slash (/) and none and its default value is hyphen (-).

The following screenshot presents a view of a typical session log file having default values for the eLogFileSTSeparator, eDateFormat and eDateSeparator parameters: