Re: [Quickfix-developers] Security Definition Request
Brought to you by:
orenmnero
From: Grant B. <gbi...@co...> - 2020-03-02 15:53:32
|
I am *very* familiar with this particular ICE interface. I have some comments and suggestions: BUT FIRST: You are on the wrong mailing list. This list is for the original C++ version, not the C# port "QuickFix/N" (which I maintain) that I think you are using. See http://quickfixn.org/help/ . *However, the following advice would apply to any QF port:* ICE's SecDef responses can be frickin' huge multipart beasts. I suspect you are requesting too much too fast, and then trying to handle them all on the QF event-processing thread. The messages are backing up in the queue, blocking the engine from responding to ICE in a timely fashion. *Suggestion 1:* All QF callbacks should return quickly. If you have expensive processing, delegate it to a separate worker thread. In your case: create a second worker thread to handle SecDefs. When you receive a SecDef, your OnMessage(SecDef) callback should push it into a queue that the worker thread will consume from. *Suggestion 2:* Put a delay between each SecDef Request you send. As high as you can tolerate. ICE will send those responses fast and frequently; you've gotta give your OnMessage() some room to handle them. I have a client whose users wants to send 50+ SecDefRequests every morning. Right now we have them staggering each request by 60 seconds. On the downside, it means they have to wait an hour to get the full set. (Some responses are bigger than others. If you wanted, you could look at the logs and figure out which Defs are huge and which are small, and only do the delay after requesting big ones.) -Grant On Mon, Mar 2, 2020 at 9:10 AM Veduruparthi Raju <rve...@gm...> wrote: > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/ > > Hello, > > I am developing a project in .NET to connect to ICE and i am using the > QuickFIX engine version 1.9 and have a problem with the > security definitions subscriptions. > > I am subscribing to the security definitions and am receiving the > responses (35=d) and in the onMessage method, i straight away processing > the responses and writing them to the database directly. The problem is > every 2 minutes my sessions logs out with the below error message. The > connection forcibly closes by ICE. > > I have contacted them and were saying to increase the heap size which i > was not convinced and need help to understand what is the correct way of > handling this in .NET since i know the market reference data is huge. > > Appreciate your response. > > System.IO.IOException: Unable to write data to the transport connection: > An existing connection was forcibly closed by the remote host. ---> > System.Net.Sockets.SocketException: An existing connection was forcibly > closed by the remote host > at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, > Int32 size) > --- End of inner exception stack trace --- > at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, > Int32 size) > at QuickFix.SocketInitiatorThread.Send(String data) > at QuickFix.Session.Send(String message) > at QuickFix.Session.SendRaw(Message message, Int32 seqNum) > at QuickFix.Session.Next() > at QuickFix.Session.Next(MessageBuilder msgBuilder) > at QuickFix.SocketInitiatorThread.ProcessStream() > at QuickFix.SocketInitiatorThread.Read() > > Thanks, > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers -- Grant Birchmeier *Connamara Systems, LLC* *Made-To-Measure Trading Solutions.* Exactly what you need. No more. No less. http://connamara.com -- This email, along with any attachments, is confidential. If you believe you received this message in error, please contact the sender immediately and delete all copies of the message. Thank you from Connamara Systems, LLC. |