Re: [Quickfix-developers] multiple sessions/connections
Brought to you by:
orenmnero
From: azmat <mr...@gm...> - 2008-03-05 23:08:42
|
All- I need to setup 3 connections (one for market data, one for orders, and one for Drop Copies). Do I just need to setup the config file with three connections with the appropriate information? Also, how do I call Session.Logon() or Session.Logout()? I can't instantiate an instance of Session (it lacks a constructor) and the logon/logout methods are not static. Is this how I would logout/logon specific sessions, if I were able to use these functions? many thanks to all. thanks! azmat azmat wrote: > > All- > > I've setup two connections in my config file, but how do I start both > sessions? Would they both get called if their information is in the > "FixSettings.txt" file with the code below (when _initiator.start() is > called): > > > if (_initiator != null) > throw new Exception("Already Started"); > try > { > SessionSettings settings = new > SessionSettings("FixSettings.txt"); > QFWrapper application = new QFWrapper(this); > FileStoreFactory storeFactory = new > FileStoreFactory(settings); > FileLogFactory logFactory = new FileLogFactory(settings); > MessageFactory messageFactory = new > DefaultMessageFactory(); > _initiator = new ThreadedSocketInitiator(application, > storeFactory, settings, logFactory, messageFactory); > _initiator.start(); > } > catch (Exception e) > { > System.Diagnostics.Trace.WriteLine("FixServer.Start() > ERROR: " + e.Message); > } > > > Also, I need to setup another session for Drop Copies, and I imagine the > same rule applies to 3 sessions as it does with 2. Basically what I will > be doing is cracking any messages received, and if the messages contained > are MarketData Messages (specifically snapshot, incremental, or reject > messages), I will use the appropriate market-data logic in my application. > If it is an execution Report then the cracker will pick it up and we can > take care of it. Is this the correct approach? > > > thanks! > azmat > -- View this message in context: http://www.nabble.com/multiple-sessions-connections-tp15834166p15862725.html Sent from the QuickFIX - Dev mailing list archive at Nabble.com. |