{{Quickfixn}} Multiple SocketInitiator

Marko Simovic markobarko at gmail.com
Fri Jul 17 18:32:01 PDT 2015


i'm building an adapter between a proprietary protocol and fix in .NET. I
have multiple users connecting via proprietary protocol, whose
orders/requests i will pass on via FIX to a remote server. I am mulling
about between two different implementations:

1) one FIX connection to remote server and all my users send over that
connection
2) a FIX connection per user

I have both implementations currently and i'm leaning towards the second.
However, i am wondering if there is any problem instantiating multiple
SocketInitiator in same process with same settings (only thing i am
modifying is the sendercompid). Will there be problems with concurrent
writing to the message store and log? Other concurrency issues?
More generally, what is the 'accepted' pattern for this use case?

Below is the code that generates my socketinitiator for case #2:

public static QuickfixApplication CreateApplication(string compId)
        {
            //create custom settings for this session
            var settings = new SessionSettings(new
StringReader(Properties.Resources.QuickfixSettings));
            var newSession = new
SessionID(settings.Get().GetString(SessionSettings.BEGINSTRING),
                compId,
settings.Get().GetString(SessionSettings.TARGETCOMPID));
            var customSession = new QuickFix.Dictionary();
            customSession.SetString(SessionSettings.BEGINSTRING,
settings.Get().GetString(SessionSettings.BEGINSTRING));
            customSession.SetString(SessionSettings.SENDERCOMPID, compId);
            settings.Set(newSession, customSession);

            //create quickfix application
            var myApp = new QuickfixApplication();
            var storeFactory = new FileStoreFactory(settings);
            var logFactory = new FileLogFactory(settings);
            var socketInitiator = new SocketInitiator(myApp, storeFactory,
settings, logFactory);
            myApp.SocketInitiator = socketInitiator;

            return myApp;
        }

Thanks for any help!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20150717/ed636c76/attachment.htm>


More information about the Quickfixn mailing list