在无法使用 onLogon 的情况下将接受者序列号重置为发起者

Resetting acceptor sequence numbers as an initiator without ability to use onLogon

您好,我 运行 遇到了一个问题,该问题通常是一个常见的解决方案,但我的问题有一个转折点。我将在这里引用通常的答案:

"Sequence numbers between the client and the server has to be sync. In your case even if you reset the sequence number, you will get the same error because the client will send a larger sequence number that you have. It is a common practice that both the client and the server resets the sequence numbers on agreement(on logon,each day or sending 141=Y etc.)."

问题是这个标志"ResetMsgSeqNum"只能用在Quickfix的onLogon方法中。

我无法登录,因为序列号不同步,所以我没有机会告诉接受者也重置它的序列号。

有人建议增加到下一个序列号,但这些是针对 Java Quickfix 的,我不知道如何在 python 版本中执行此操作。我将 post 下面是我的日志样本,说明正在发生的事情。

注意:我只从偶数日志中删除了识别信息,因此下面的标签实际上并不是空白的。 "onCreate"等消息是调试语句,用于指示方法是否已成功执行。

感谢所有帮助!

onCreate
<20180618-22:50:15.000000000, FIX.4.4:, event>
  (Created session)
<20180618-22:50:15.000000000, FIX.4.4:, event>
  (Connecting to on port 8101 (Source :0))
toAdmin
<20180618-22:50:15.000000000, FIX.4.4:, outgoing>
  (8=FIX.4.4 9=112 35=A 34=13 49= 52=20180618-22:50:15.000 56= 554=PASSWORD
<20180618-22:50:15.000000000, FIX.4.4:, event>
  (Initiated logon request)
<20180618-22:50:16.000000000, FIX.4.4:, incoming>
  (8=FIX.4.4 9=76 35=5 34=6 49= 52=20180618-22:50:16.227 56= 10=171 )
fromAdmin
<20180618-22:50:16.000000000, FIX.4.4:, event>
  (Received logout request)
toAdmin
<20180618-22:50:16.000000000, FIX.4.4:, outgoing>
  (8=FIX.4.4 9=77 35=5 34=14 49= 52=20180618-22:50:16.000 56= 10=208 )
<20180618-22:50:16.000000000, FIX.4.4:, event>
  (Sending logout response)
<20180618-22:50:16.000000000, FIX.4.4:, event>
  (Disconnecting)
onLogout
toAdmin
<20180618-22:50:16.000000000, FIX.4.4:, event>
  (Initiated logon request)
onLogout

设置 ResetSeqNumFlag=Y 应该可以解决您的问题。它所做的是将 ResetSeqNumFlag(141) 标签设置为 Y。然后这个标签包含在登录请求中,因此即使您不同步,接受者也会重置序列号。