Weird behavior of Quickfix/j after “Sent test request TEST” happens

后端 未结 2 1288
刺人心
刺人心 2021-01-20 07:18

I\'m using Quickfix/J to receive the message but \"Sent test request TEST\" happen. The log file (FIX.4.2-A-B.event.log)shows that:

23:19:05: Sent test reque         


        
相关标签:
2条回答
  • 2021-01-20 07:51

    Your analysis is generally ok, though here's a closer look at the times for each message:

    23:19:05: Sent test request TEST  
    23:19:05.909: Sent the 35=1 with 112=TEST
    23:19:23.381: Received the 35=0 with 112=TEST
    23:19:32: Disco timeout "waiting for heartbeat"
    23:19:44: Disco timeout "waiting for logon response"
    

    If there's something strange... in your network...

    call the network team?

    Something is causing your first disconnect. As the message says it's waiting for a heartbeat that probably doesn't include the 35=0 response to the test request. It's probably waiting for a 35=1 from B.

    What kind of messages are filling up the FIX.4.2-A-B.messages.log? Can you post some examples?

    0 讨论(0)
  • 2021-01-20 07:53

    the FIX standard heartbeat behavior is as follows:

    1. On Logon, the Initiator requests a heartbeat interval (usual default 30 seconds)
    2. From now on every side expects at least one message every 30 seconds (defined heartbeat interval)
    3. If there is no application message available, a heartbeat is sent instead
    4. If one side does not get neither a heartbeart nor an application message after 30 seconds, a connection issue is suspected.
    5. Therefore, a TestRequest is sent ("Are you still there?"): Sent test request TEST
    6. This TestRequest is not answered by a Heartbeat with the supplied TestRequestID, the connection is considered dead.
    7. Finally, the network connection is dropped: Disconnecting: Timed out waiting for heartbeat
    

    In your third update, your initiator A did respond to the test request with a heartbeat, and supplied the requested id tag 112:

    8=FIX.4.2|9=86|35=1|49=B|56=A|43=N|34=2|52=23:00:20.222|112=07:00:20|10=081|
    8=FIX.4.2|9=81|35=0|34=2|49=A|52=23:00:07.301|56=B|112=07:00:20|10=091|
    

    So that's good. From then on, A supplies a heartbeat 30 seconds later:

    8=FIX.4.2|9=57|35=0|34=3|49=A|52=23:00:38.075|56=B|10=228|
    

    But B does not reply for 13 seconds:

    8=FIX.4.2|9=63|35=0|49=B|56=A|43=N|34=26|52=23:00:51.260|10=00
    

    Is there some network issue between A and B? What problem are you experiencing?

    0 讨论(0)
提交回复
热议问题