{{Quickfixn}} Acceptor Sessions configuration for variable number of clients

Pavel pavka1799 at gmail.com
Thu May 3 13:56:03 PDT 2018


Hello!

Please advise, what is the proper way to setup the Acceptor for variable
number of clients?

In the documentation's example there are fixed number of [SESSION] sections
in the configuration file. Will it be also correct to maintain sessions
dynamically, using:
ThreadedSocketAcceptor.AddSession(SessionID sessionID, Dictionary dict)
?

E.g. having the list of all clients in a database, after creating
ThreadedSocketAcceptor and before starting it do as below:
***************
_acceptor = new ThreadedSocketAcceptor(...);
foreach (<client_record> in <client_table>){
    sessionID = new SessionID(QuickFix.Values.BeginString_FIX44,
"My_Acceptor_CompID", <client_record.client_name>);
    Dictionary settings = new Dictionary();
    settings.SetString(SessionSettings.CONNECTION_TYPE, "acceptor");
    settings.SetString( ...); // add all other required parameters
    _acceptor.AddSession(sessionID, sessionConfig)
}
_acceptor.Start();
***************

Later on, can more new sessions be added (for the new clients) on the fly
into already started Acceptor (similarly with AddSession)?


Is the above the proper approach to enable variable number of clients to
connect to the Acceptor (without changing configuration file and
re-starting the Acceptor)?

Thank you!

Best regards,
Pavel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20180503/58f7c372/attachment.html>


More information about the Quickfixn mailing list