0

I have a implementation of QuickFIX/n that I have given to a client. It connects to the Currenex RFQ system. They experience a issue when the start up the application occasionally. No errors are getting thrown, and it works fine in my testing. The only way they can successfully get it to connect is to restart their entire server.

I have no idea why this is happening and it doesn't thrown any errors. I have my entire fix connection wrapped in a try|catch statement, so I don't know what else I could be missing. Below is my connect method. The code executes and all the logging is hit, but the logon message is never sent.

I'm at my wits end and so is our client, any pointers would be a huge help.

Code:

public void Connect()
    {
        try
        {
        string beginString = "FIX.4.2";
        MemoryStoreFactory storeFactory = new MemoryStoreFactory();
        MessageStoreFactory msgFactory;
        LogFactory logfactory;
        SessionSettings settings = new SessionSettings();
        QuickFix.Dictionary entry = new QuickFix.Dictionary();

        entry.SetString("ConnectionType", "initiator");
        entry.SetString("ReconnectInterval", "1");
        entry.SetString("SocketConnectHost", this.fixHost);
        entry.SetString("FileLogPath", this.workingDirectory + "logs");
        entry.SetString("FileStorePath", this.workingDirectory + "logs");
        entry.SetString("StartTime", "23:59:59");
        entry.SetString("EndTime", "23:59:59");
        entry.SetString("HeartBtInt", "30");
        entry.SetString("SocketNodelay", "Y");
        //entry.SetString("SocketTrafficClass", "IPTOS_LOWDELAY");
        entry.SetString("ResetSeqNumFlag", "Y");
        //entry.SetString("UseDataDictionary", "N");
        entry.SetString("DataDictionary", this.workingDirectory + "FixResourceFiles\\FIX42.xml");
        entry.SetString("ResetOnLogout", "Y");
        entry.SetString("ResetOnDisconnect", "Y");
        entry.SetString("CheckLatency", "N");
        entry.SetString("SocketConnectPort", this.fixPort);

        this.sessionId = new QuickFix.SessionID(beginString, this.senderCompId, this.targetCompId, DateTime.Now.ToString("yyyyMMddhhmmssfff"));

        settings.Set(this.sessionId, entry);

        if (this.storeAllQuickFixMsgs)
        {
            logfactory = new FileLogFactory(settings);
        }
        else
        {
            logfactory = new ScreenLogFactory(settings);
        }

        msgFactory = new FileStoreFactory(settings);

        Logger.MsgLog("Creating QuickFIX Socket Initiator...");
        QuickFix.Transport.SocketInitiator init = new QuickFix.Transport.SocketInitiator(this, msgFactory, settings);
        //this.socketInitiator = new QuickFix.Transport.SocketInitiator(this, msgFactory, settings, logfactory);
        this.socketInitiator = init;


        Logger.MsgLog("Starting Socket Initiator...");
        this.socketInitiator.Start();
        Logger.MsgLog("Started");

        }
        catch (Exception ex)
        {
            Logger.MsgLog("Error on FIX Connection: " + ex);
        }
    }

Settings: (internal corporate FIX host) CNX i1scfxcrfq 10.192.6.121 444 test1234

user576838
  • 865
  • 3
  • 19
  • 39

1 Answers1

0

Check the below two lines:

entry.SetString("StartTime", "23:59:59");
entry.SetString("EndTime", "23:59:59");

I guess this is why you might be facing issues. The initiator will only start at StartTime. Your client might be starting it at some other time?

Rush
  • 486
  • 2
  • 11
  • I've since changed it to OO:00:00 to remove that issue. No to have them test it. – user576838 Apr 10 '13 at 18:11
  • Why don't you just remove it and make the initiator connect when it comes up? – Rush Apr 11 '13 at 14:11
  • Having StartTime/EndTime be the same is not problem. It just means that the session will restart at that time. If you set it to an invalid time, I think you'll get an exception and it won't start at all. – Grant Birchmeier May 17 '13 at 02:41