I am explaining about how we can create sessions dynamically through code using QuickFix. My earlier examples were using configuration files. But we can also create session dynamically, this might be helpful when application maintains many sessions, so we can keep session metadata information in xml or database to track or maintain sessions.
You can find code which describe fix initiator and fix acceptor in my earlier
post.
Below is code which creates multiple listener sessions in Fix Acceptor:
SessionSettings settings = new SessionSettings();
SessionID id1 = new SessionID(new BeginString("FIX.4.2"),
new SenderCompID("FixServer"),
new TargetCompID("Client1"), "Session1");
Dictionary d = new Dictionary();
d.setString("ConnectionType", "acceptor");
d.setLong("SocketAcceptPort", 5001);
d.setString("FileLogPath", "Log");
d.setString("StartTime", "00:00:00");
d.setString("EndTime", "00:00:00");
d.setString("FileStorePath", @"c:\fixfiles");
d.setBool("UseDataDictionary", true);
d.setString("DataDictionary", @"FIX42.xml");
settings.set(id1,d);
id1= new SessionID(new BeginString("FIX.4.2"),
new SenderCompID("FixServer"),
new TargetCompID("Client2"), "Session2");
d = new Dictionary();
d.setString("ConnectionType", "acceptor");
d.setLong("SocketAcceptPort", 5001);
d.setString("FileLogPath", "Log");
d.setString("StartTime", "00:00:00");
d.setString("EndTime", "00:00:00");
d.setString("FileStorePath", @"c:\fixfiles");
d.setBool("UseDataDictionary", true);
d.setString("DataDictionary", @"FIX42.xml");
settings.set(id1, d);
FixServerApplication application = new FixServerApplication();
FileStoreFactory storeFactory = new FileStoreFactory(settings);
ScreenLogFactory logFactory = new ScreenLogFactory(settings);
MessageFactory messageFactory = new DefaultMessageFactory();
SocketAcceptor acceptor
= new SocketAcceptor(application, storeFactory, settings,
logFactory, messageFactory);
acceptor.start();
Console.WriteLine("press to quit");
Console.Read();
acceptor.stop();
SessionSettings instance accepts dictionary object and SessionID to create new session. Dictionary class maintain key value pair. We can find more about FIX configuration details
here.
• Solution Architect /Principle Lead Developer with 12 years of IT experience with more emphasize on Capital Domain and Investment banking domain.
• Strong experience in Continuous Integration, Delivery and DevOps solutions.
• Strong experience in drafting solutions, stakeholder communications and risk management.
• Proved strong coding and designing skills with agile approaches (TDD, XP framework, Pair Programming).
• Delivered many projects with involvement from inception to delivery phase.
• Strong experience in high performance, multithreaded, low latency applications.
• Ability to communicate with the business and technical stake holders effectively.
• Have extensive experience in Capital Market Domain: Front Office & BackOffice (Algorithm Trading tools, messaging framework, Enterprise bus, integration of FIX APIs and many trading APIs).
• Functional knowledge of Portfolio/Wealth Management, Equities, Fixed Income, Derivatives, Forex.
• Practical knowledge of building and practicing agile delivery methodologies (SCRUM, TDD, Kanban).
Technical Skills
• Architectural: Solution Design, Architectural Presentations (Logical, Component, Physical, UML diagrams)
• Languages: C#, C++
• Server Technologies: WCF, Web API,
• Middle Ware: ActiveMQ, RabbitMQ, Enterprise Service Bus
• UI Technologies: Winforms and WPF
• Web Technologies: Asp.Net Mvc, KnockOutJS, JQuery, Advance Java Scripts Concepts
• Databases: Sql Server 2008 +, MySQL
• Tools/Frameworks: TFS, SVN, NUnit, Rhino Mocks, Unity, NAnt, QuickFix/n, Nhibernate, LINQ, JIRA,
Functional Skills
• Wealth Management System, Trade Life Cycle, Trading Components and their integrations
• Working knowledge of Stocks, Bonds, CFDs,Forex, Futures and Options
• Pricing Systems, Market Data Management,
• BackOffice Processes : Settlement Processes, Netting, Tax, Commissions, Corporate Actions Handling,
• Reporting Solutions : OLTP and OLAP Data model designing
• FIX Engine implementation and integration