简体   繁体   English

在 QuickFIX/n 中监控断开连接

[英]Monitoring disconnects in QuickFIX/n

Working with QuickFIX/n and need to find a way to monitor potential crashes on the executor side (I am developing the client side).使用 QuickFIX/n 并需要找到一种方法来监控执行器端的潜在崩溃(我正在开发客户端)。 I see there is logging when a connection stops but no way of tracking and triggering anything in the code.我看到连接停止时会记录日志,但无法跟踪和触发代码中的任何内容。

I have looked at Quickfix/n - No event for connection timeout or host not found?我查看了Quickfix/n - 没有连接超时事件或找不到主机? but it only addresses initial connection, not crashes post connection.但它只解决初始连接,而不是连接后崩溃。 QuickFIX/J has SessionStateListener https://quickfixj.org/javadoc/1.6.4/quickfix/SessionStateListener.html but not finding anything similar in the C# variant. QuickFIX/J 有 SessionStateListener https://quickfixj.org/javadoc/1.6.4/quickfix/SessionStateListener.html但在 ZD7EFA19FBE247D3972FDZ5ADB6 变体中没有找到任何类似的东西。

Basically, need to find a way to create an observer but do not see anything built in that could be of use.基本上,需要找到一种方法来创建观察者,但看不到任何可以使用的内置内容。

This isn't a definitive solution but ends justify the means for now.这不是一个明确的解决方案,但最终证明了目前的手段是合理的。

Have created own implementation of the ILogFactory (rather than use builtins) and it listens to the message containing " disconnecting: " then sends info to applicable services.已经创建了自己的ILogFactory实现(而不是使用内置函数),它侦听包含“断开连接:”的消息,然后将信息发送到适用的服务。 Causes some strange coupling but currently not seeing a clean way like the java implementation does it.导致一些奇怪的耦合,但目前没有看到像 java 实现这样的干净方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM