// Create application by loading all settings from repository server (identified by Uri, userID and password). FIXStandaloneApplication app = new FIXStandaloneApplication(RepositoryServerUri, RepositoryUser, RepositoryPassword); // Hook up event handlers. app.FIXEngineInitialized += app_FIXEngineInitialized; app.FIXEngineStarted += new FIXEngineEventHandler(app_FIXEngineStarted); app.FIXEngineRecovered += new FIXEngineEventHandler(app_FIXEngineRecovered); app.FatalErrorOccurs += new FIXStandaloneApplicationFatalErrorHandler(app_FatalErrorOccurs); // Only way to fine tune the system performance of the QWFIX trading system. QWFIX engine can // cache over 3 million messages per gigabyte of memory. // QWFIX should be running on a dedicated 64 bit system, the memory utilization should be very // predictable in this way. FIXEngine.InitMessageCache(FIXEngineMessageCacheType.ManageCacheByMessageCount, 3000000); // "FixLogDirectory" should point to a directory in local file system, which will be used to store all log files. // "StartupMode" should be "Recover" for production system. "Reset" and "Reconfig" should only be used in QA and testing environment. app.Run("Tutorial_OrderMan_Server", FIXEngineRole.Primary, FixLogDirectory, StartupMode, false);
static void app_FIXEngineInitialized(FIXEngine fixEngine) { // TODO: } static void app_FIXEngineRecovered(FIXEngine engine) { // TODO: } static void app_FIXEngineStarted(FIXEngine engine) { // TODO: } static void app_FatalErrorOccurs(Exception exception) { // TODO: }
FIXStandaloneApplication
FIXStandaloneApplication.FIXEngineInitialized
FIXStandaloneApplication.FIXEngineStarted
FIXStandaloneApplication.FIXEngineRecovered
FIXEngine.InitMessageCache
FIXStandaloneApplication.Run