Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent Heartbeats and Gap between the messages #775

Open
shivamxsharmaaibie opened this issue May 25, 2023 · 1 comment
Open

Inconsistent Heartbeats and Gap between the messages #775

shivamxsharmaaibie opened this issue May 25, 2023 · 1 comment

Comments

@shivamxsharmaaibie
Copy link

Hi,

My name is Shivam. This is in regards to inconsistency in the heartbeats that we are observing in our FIX messages.

Background:
To give you are bit of background, we have a Windows Service written in .NET that's using QuickFix.dll version 1.5.0 to send FIX messages as initiator.

Configuration:
Our initiator.cfg looks like this:
[DEFAULT]
ConnectionType=initiator
HeartBtInt=10
ReconnectInterval=60
FileLogPath=E:\xyz\QuickFix\log\initiator
FileStorePath=E:\xyz\QuickFix\store\initiator
StartTime=02:05:00
EndTime=02:00:00
UseDataDictionary=Y
ValidateFieldsOutOfOrder=N
ValidateUserDefinedFields=N
DataDictionary=E:\xyz\QuickFix\spec\fix\FIX44_AIB_P2.xml
TimeZone=UTC

[SESSION]
BeginString=FIX.4.4
SenderCompID=abc
TargetCompID=def
SocketConnectPort=1234
SocketConnectHost=127.0.0.1
ResetOnLogon=Y
ResetOnLogout=Y
ResetOnDisconnect=Y

Issue:
From the above config, you can see that the HeartBtInt is set to 10 seconds, which means as an initiator, we should always be sending heartbeats after 10 seconds. The problem we are facing is inconsistent heart beats. While most of the times, FIX messages looks okay, meaning heart beats are sent every 10 seconds but there are times this 10 second config is not adhered to.
We have the logging enabled and can see there are no hear beats sent for over 40 seconds.

Here is the example:
The session started at around 02:05 A.M and messages were exchanged between sender and target:
20230509-02:05:37.643 : 8=FIX.4.4�9=73�35=A�34=1�49=abc�52=20230509-02:05:37.643�56=def�98=0�108=10�141=Y�10=123�
20230509-02:05:37.658 : 8=FIX.4.4�9=73�35=A�34=1�49=def�52=20230509-02:05:37.690�56=abc�98=0�108=10�141=Y�10=125�

Then, you can see the consistent hear beats exchanged at regular 10 second intervals as per the initiator.cfg:
20230509-02:05:47.658 : 8=FIX.4.4�9=55�35=0�34=2�49=abc�52=20230509-02:05:47.658�56=def�10=046�
20230509-02:05:47.658 : 8=FIX.4.4�9=55�35=0�34=2�49=def�52=20230509-02:05:47.693�56=abc�10=045�
20230509-02:05:57.658 : 8=FIX.4.4�9=55�35=0�34=3�49=abc�52=20230509-02:05:57.658�56=def�10=048�
20230509-02:05:57.658 : 8=FIX.4.4�9=55�35=0�34=3�49=def�52=20230509-02:05:57.693�56=abc�10=047�
20230509-02:06:07.659 : 8=FIX.4.4�9=55�35=0�34=4�49=abc�52=20230509-02:06:07.659�56=def�10=046�
20230509-02:06:07.659 : 8=FIX.4.4�9=55�35=0�34=4�49=def�52=20230509-02:06:07.693�56=abc�10=044�
20230509-02:06:17.659 : 8=FIX.4.4�9=55�35=0�34=5�49=abc�52=20230509-02:06:17.659�56=def�10=048�
20230509-02:06:17.659 : 8=FIX.4.4�9=55�35=0�34=5�49=def�52=20230509-02:06:17.693�56=abc�10=046�
..............
.................
This continues for some time. But then there comes a gap of 45 seconds. See below:

20230509-11:34:37.642 : 8=FIX.4.4�9=249�35=S�34=53368�49=def�52=20230509-11:34:18.828�56=abc�115=ghi�116=##Customer 1�1=GENROI�15=EUR�38=495.9�54=2�55=EUR/USD�64=20230511�117=5798521:26�131=11925�132=1.0815�188=1.0815�189=0.00�631=1.0966�10=160�

20230509-11:35:22.876 : 8=FIX.4.4�9=73�35=A�34=1�49=abc�52=20230509-11:35:22.876�56=def�98=0�108=10�141=Y�10=128�

20230509-11:35:22.892 : 8=FIX.4.4�9=73�35=A�34=1�49=def�52=20230509-11:35:22.913�56=abc�98=0�108=10�141=Y�10=120�

Queries/ Help:

  1. Would you be able to suggest what might be going wrong looking at the above logs? Is that a known issue with QuickFix.dll?
  2. Is there anything we can do to improve logging or troubleshoot where things might be going wrong? For example, when there is a gap, can we check what was Quickfix doing? Was it running, idle, etc?
  3. Is there anything we can tweak in the settings to fix this inconsistency of heartbeats?

Appreciate your help in advance.

@gbirchmeier
Copy link
Member

The current version of QF/n is 1.10.0. The version you are using was released 10 years ago.

So I recommend that you update your library and then see what you see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants