quickfix / quickfix

QuickFIX C++ Fix Engine Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QuickFIX c++ resending Logon message

danilsh opened this issue · comments

Weird behaviour. Im initiating session without ResetOnLogon set. When external party sends to me a Logon response, it contains ResetSeqNumFlag=Y. It seems, that QuickFIX generates a second Logon request in this case as a response to external party's response:

20230207-10:51:58.000000000 : 8=FIX.4.4�9=94�35=A�34=5�49=XXXX�52=20230207-10:51:57.000�56=YYYY�98=0�108=30�141=N�554=12345678�10=212�
20230207-10:51:59.000000000 : 8=FIX.4.4�9=0081�35=A�49=YYYY�56=XXXX�34=1�52=20230207-10:51:58.992�98=0�108=30�141=Y�10=039�
20230207-10:52:02.000000000 : 8=FIX.4.4�9=94�35=A�34=1�49=XXXX�52=20230207-10:51:59.000�56=YYYY�98=0�108=30�141=Y�554=12345678�10=221�

I could be wrong, it seems that I found a code, responsible for this behavior: Session.cpp, line 238 at master.

When I set ResetOnLogon=Y in session settings, all works just fine. Without Logons doubling.

What am I doing wrong?

I had commented out line 242 in Session.cpp. QuickFIX stopped generate second Logon, BUT didnt generate a responce to ResendRequest message, that came from external party because of incorrect ResetSeqNumFlag value in my Logon message:

20230207-14:40:38.000000000 : 8=FIX.4.4�9=88�35=A�34=4�49=XXXX�52=20230207-14:40:38.000�56=YYYY�98=0�108=30�554=12345678�10=181�
20230207-14:40:38.000000000 : 8=FIX.4.4�9=0081�35=A�49=YYYY�56=XXXX�34=1�52=20230207-14:40:38.714�98=0�108=30�141=Y�10=031�
20230207-14:40:38.000000000 : 8=FIX.4.4�9=0072�35=2�49=YYYY�56=XXXX�34=2�52=20230207-14:40:38.714�7=1�16=0�10=070�

Now, after some research I think it is a correct behavior of QuickFIX. At least it does what it told to. But I will take some time to explore further - I will wait what external party's support tells me.

Ok. Techsupp on external party replied to me that if they sending a ResendRequest message to me, and they requesting to resend only technical messages (Logon is a technical message? Guess yes), then my side should respond with SequenceReset message in GapFill or Reset mode. Is it conformant with FIX standard or it is a custom behavior?