为什么我的Acceptor即使收到Heartbeat之后也会断开连接?

时间:2017-03-21 20:00:59

标签: java fix-protocol quickfixj

使用QuickFIX / J 1.6.3

我在QuickFIX / J Acceptor上遇到这种奇怪的行为,我完全不知道为什么。我的Acceptor正在发送一个TestRequest,期待一个Heartbeat,发起者发给我一个Heartbeat,但是我的接受者正在断开连接说:

  

等待心跳超时

当Initiator尝试登录并且Acceptor不让它说出来时,它变得更加奇怪

  

不允许此会话进行多次登录/连接

您可以在事件中看到它,并在下面显示消息。非常感谢任何帮助。

另外,我的Acceptor有配置CheckLatency=N。我这样做是因为发起人的发送时间稍微落后于我。

事件日志:

20170321-17:22:48: Session FIX.4.2:MY_COMP_ID->MY_CUSTOMER_COMP_ID schedule is weekly, SUN 00:00:00-UTC - SAT 23:00:00-UTC

20170321-17:22:48: Created session: FIX.4.2:MY_COMP_ID->MY_CUSTOMER_COMP_ID

20170321-17:25:31: Accepting session FIX.4.2:MY_COMP_ID->MY_CUSTOMER_COMP_ID from /x.x.x.x:yyyy

20170321-17:25:31: Acceptor heartbeat set to 60 seconds

20170321-17:25:31: Logon contains ResetSeqNumFlag=Y, resetting sequence numbers to 1

20170321-17:25:31: Received logon

20170321-17:25:31: Responding to Logon request

20170321-17:47:49: Sent test request TEST

20170321-17:48:43: Disconnecting: Timed out waiting for heartbeat

20170321-17:48:50: Accepting session FIX.4.2:MY_COMP_ID->MY_CUSTOMER_COMP_ID from /x.x.x.x:yyyy

20170321-17:48:50: Acceptor heartbeat set to 60 seconds

20170321-17:49:21: Multiple logons/connections for this session are not allowed

20170321-17:49:51: Multiple logons/connections for this session are not allowed

20170321-17:50:22: Multiple logons/connections for this session are not allowed

20170321-17:55:31: Multiple logons/connections for this session are not allowed

20170321-17:56:01: Multiple logons/connections for this session are not allowed

20170321-17:56:32: Multiple logons/connections for this session are not allowed

消息日志

8=FIX.4.2 | 9=77 | 35=1 | 34=55 | 49=MY_COMP_ID | 52=20170321-17:47:49.041 | 56=MY_CUSTOMER_COMP_ID | 112=TEST | 10=120 | 

8=FIX.4.2 | 9=78 | 35=0 | 34=229 | 49=MY_CUSTOMER_COMP_ID | 52=20170321-17:47:34.838 | 56=MY_COMP_ID | 112=TEST | 10=179 | 

8=FIX.4.2 | 9=85 | 35=A | 34=1 | 49=MY_CUSTOMER_COMP_ID | 52=20170321-17:48:36.583 | 56=MY_COMP_ID | 98=0 | 108=60 | 141=Y | 10=141 | 

8=FIX.4.2 | 9=85 | 35=A | 34=1 | 49=MY_CUSTOMER_COMP_ID | 52=20170321-17:49:07.034 | 56=MY_COMP_ID | 98=0 | 108=60 | 141=Y | 10=131 | 

8=FIX.4.2 | 9=85 | 35=A | 34=1 | 49=MY_CUSTOMER_COMP_ID | 52=20170321-17:49:37.469 | 56=MY_COMP_ID | 98=0 | 108=60 | 141=Y | 10=146 | 

8=FIX.4.2 | 9=85 | 35=A | 34=1 | 49=MY_CUSTOMER_COMP_ID | 52=20170321-17:50:07.952 | 56=MY_COMP_ID | 98=0 | 108=60 | 141=Y | 10=132 | 

8=FIX.4.2 | 9=85 | 35=A | 34=1 | 49=MY_CUSTOMER_COMP_ID | 52=20170321-17:55:17.035 | 56=MY_COMP_ID | 98=0 | 108=60 | 141=Y | 10=130 | 

8=FIX.4.2 | 9=85 | 35=A | 34=1 | 49=MY_CUSTOMER_COMP_ID | 52=20170321-17:55:47.502 | 56=MY_COMP_ID | 98=0 | 108=60 | 141=Y | 10=132 | 

8=FIX.4.2 | 9=85 | 35=A | 34=1 | 49=MY_CUSTOMER_COMP_ID | 52=20170321-17:56:17.985 | 56=MY_COMP_ID | 98=0 | 108=60 | 141=Y | 10=145 | 

1 个答案:

答案 0 :(得分:1)

似乎存在QuickFIX / J错误,其中Heartbeat计时器和登录状态检查不同步。

此解决方案并不理想,而且更像是一种解决方法:

TestRequestDelayMultiplier=1&#39> session.cfg 上设置Acceptor。这将使引擎有更多的余地,以便根据心跳检查登录状态。