{{Quickfixn}} FIX connection Logout/Login Problem

Grant Birchmeier gbirchmeier at connamara.com
Thu Jul 16 06:16:46 PDT 2020


With all due respect, I can't really teach people about C# multi-threading
on this list.  I can only give a few pointers.

Please check out the BlockingCollection:
https://docs.microsoft.com/en-us/dotnet/api/system.collections.concurrent.blockingcollection-1?view=netcore-3.1
The default BlockingCollection implementation is a ConcurrentQueue, which
is FIFO.

You will create a BlockingCollection<Message>.  Your QF callbacks will
Add() messages to this collection (on the QF thread).  You need to create a
separate worker thread that will call collection.Take() over and over again
(if the collection is empty, it will block until something goes in there)
and process the message.



On Thu, Jul 16, 2020 at 7:20 AM YUTAKA YOSHIDA <ysdytk1973 at gmail.com> wrote:

> Thank you for your response.
>
> Could you provide me an example code?
> I have tried in several ways but this issue remains unresolved.
> I am attaching my quick fix log file.
>
> Best regards,
> Yutaka
>
> On Wed, Jul 15, 2020 at 11:16 PM Grant Birchmeier <
> gbirchmeier at connamara.com> wrote:
>
>> My strong suspicion guess is that you are doing too much work within the
>> OnMessage callback.  (Or any callback, really, but probably OnMessage.)
>>
>> For each message received, OnMessage(<type>) is called, and further
>> message reception is blocked until OnMessage() returns.  So if OnMessage
>> takes too long, the queue eventually will back up and you will eventually
>> see message loss.
>>
>> A common technique is to have OnMessage push the message into a work
>> queue and return instantly, while another thread consumes off the work
>> queue and processing them.
>>
>> Does that make sense?
>>
>>
>>
>>
>>
>> On Wed, Jul 15, 2020 at 6:09 AM YUTAKA YOSHIDA <ysdytk1973 at gmail.com>
>> wrote:
>>
>>> Hello everyone,
>>>
>>> I am using Quickfixn for accessing LMAX.
>>> I have a serious problem now.
>>> During receiving the price updates from the server, logout/login repeats
>>> sometimes.
>>> LMAX said like this.
>>> ///////////////////////////////////////////////////////
>>>
>>> If your software gets overwhelmed it will return a TCP Window size=0,
>>> this means that you’re not able to receive further messages at the moment,
>>> and the TCP transmission is halted until it can process the messages in its
>>> receive buffer.
>>>
>>> TCP back pressure will result when your software is unable to process
>>> the TCP packets fast enough (can't keep up) so messages start to back up on
>>> our side awaiting being sent.  If your software gets overwhelmed it will
>>> return a TCP Window size = 0 which means that there is no room to send
>>> anything more at this time and messages queue up awaiting the next
>>> available window size.
>>>
>>> We can try reducing the amount of updates we are sending to you (I can
>>> see your account is currently set as 1000 updates / sec with 20 levels
>>> depth market data) or you can reduce the number of instruments you are
>>> subscribing to. Please also contact you bridge provider to look at this
>>> issue.
>>>
>>> //////////////////////////////////////////////////////////////
>>>
>>> To solve this issue, I did the following steps.
>>>
>>> -I upgraded VPS.
>>>
>>> -I reduced the number of instruments to subscribe to.
>>>
>>> -I commented on codes related to file writing.
>>>
>>> However, this issue remains.
>>>
>>> I have some errors in the FIX log file.
>>>
>>> I am attaching it.
>>>
>>> Can you help me now?
>>> _______________________________________________
>>> Quickfixn mailing list
>>> Quickfixn at lists.quickfixn.com
>>> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
>>>
>>
>>
>> --
>> 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.
>> _______________________________________________
>> Quickfixn mailing list
>> Quickfixn at lists.quickfixn.com
>> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
>>
> _______________________________________________
> Quickfixn mailing list
> Quickfixn at lists.quickfixn.com
> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
>


-- 
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20200716/c7db3484/attachment.htm>


More information about the Quickfixn mailing list