gpt4 book ai didi

quickfix - 是什么导致 QuickFIX/J 中出现 "Disconnecting: Encountered END_OF_STREAM" session 消息?

转载 作者:行者123 更新时间:2023-12-03 19:45:10 84 4
gpt4 key购买 nike

我正在使用 QuickFIX/J版本 1.6.4 内 Apache Camel 2.17.0,我收到 session 消息 Disconnecting: Encountered END_OF_STREAM .这不是错误,但在我的情况下,它会导致意外 注销 .

什么情况会导致此消息,我如何分析我的案例中的哪种情况是原因?

最佳答案

由于接受的答案仅涵盖特定于应用程序的行为,因此我将列出 END_OF_STREAM 的一些可能原因。事件。

基本上它有点像 TCP 连接的“对等连接重置”事件。这意味着连接中断了,但没有用 Logout 干净地结束它。信息。

撇开网络相关的事情不谈,只要对方决定不发送 Logout,就会发生这种情况。 .大多数情况下,他们不发送注销的原因是出于安全考虑,即交易对手不想透露有关其系统的信息。

例子:

  • SSL 证书不匹配
  • 未知的 CompID 或 session (即 CompID 或 FIX 版本不匹配)
  • 重复的 CompID(就像这个特定问题中的情况一样)
  • 序列号太低(尽管不错的 FIX 引擎会发送 Logout 表明这一点)

  • 来自 FIX 规范(FIX Session Protocol、FIX Session-level Test Cases and Expected Behaviors):

    When to send a Logout vs. when to just disconnect

    In general a Logout message should always be sent prior to shutting down a connection. If the Logout is being sent due to an error condition, the Text field of the Logout should provide a descriptive reason, so that operational support of the remote FIX system can diagnosis the problem.

    There are exceptions, when it is recommended that a Logout message not be sent, these include:

    • If during a logon either the SenderCompID, TargetCompID or IP address of the session initiator is invalid, it is recommended that the session be immediately terminated and no Logout message sent. This login attempt might be an unauthorized attempt to break into your system; hence one does not want to divulge any information about one’s FIX system, such as: which SenderCompID/TargetCompID values are valid or which version of FIX is supported.

    • If during a Logon one receives a second connection attempt while a valid FIX session is already underway for that same SenderCompID, it is recommended that the session acceptor immediately terminate the second connection attempt and not send a Logout message. Sending a Logout message runs the risk of interfering with and possibly adversely affecting the current active FIX connection. For example, in some FIX system implementations, sending a Logout message might consume a sequence number that would cause an out of sequence condition for the established FIX session.

    In all other cases, if sending a Logout does not create risk or violate security, a Logout message should be sent with a descriptive text message.

    关于quickfix - 是什么导致 QuickFIX/J 中出现 "Disconnecting: Encountered END_OF_STREAM" session 消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55728850/

    84 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com