<div dir="ltr"><div><div><div><div><div><div><div><div>Hello!<br><br></div>Please advise, what is the proper way to setup the Acceptor for variable number of clients?<br><br></div>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:<br>ThreadedSocketAcceptor.<wbr>AddSession(SessionID sessionID, Dictionary dict)<br>?<br><br></div>E.g. having the list of all clients in a database, after creating 
ThreadedSocketAcceptor

and before starting it do as below:<br>***************<br>_acceptor = new ThreadedSocketAcceptor(...);<br></div>foreach (<client_record> in <client_table>){<br>    sessionID = new SessionID(QuickFix.Values.<wbr>BeginString_FIX44, "My_Acceptor_CompID", <client_record.client_name>);<br>    Dictionary settings = new Dictionary();<br>    settings.SetString(<wbr>SessionSettings.CONNECTION_<wbr>TYPE, "acceptor");<br>    
settings.SetString(

...); // add all other required parameters<br>    _acceptor.AddSession(<wbr>sessionID, sessionConfig)    <br>}<br>
_acceptor.Start();<br>
***************<br><br></div><div>Later on, can more new sessions be added (for the new clients) on the fly into already started Acceptor (similarly with AddSession)?<br></div><div><br><br></div>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)?<br><br></div>Thank you!<br><br></div>Best regards,<br></div>Pavel<br><br></div>