简体   繁体   English

QuickFIX/J:如何在 Initiator 中处理入站/出站消息

[英]QuickFIX/J: How to handle inbound/outbound message in Initiator

I need to handle the client-side of a FIX implementation.我需要处理 FIX 实现的客户端。 From the basic setup what I noticed is: once the message is sent the Initiator/client gets terminated in Eclipse while the Acceptor keeps listening on the port.从基本设置中我注意到的是:一旦发送消息,启动器/客户端将在 Eclipse 中终止,而接受器继续侦听端口。 Should the Initiator also have to be running indefinitely?发起者是否也必须无限期地运行? The application we are trying to build has to send messages我们正在尝试构建的应用程序必须发送消息

(NewOrderSingle, OrderCancelRequest) (NewOrderSingle,OrderCancelRequest)

to the Acceptor also have to receive messages for到 Acceptor 也必须接收消息

Order Cancel Confirm/Reject, Execution Report, Trade Reversals etc)订单取消确认/拒绝、执行报告、交易逆转等)

from the Acceptor.来自接受者。 Can both communications be done through a single Initiator in an asynchronous mode?两种通信都可以通过异步模式下的单个 Initiator 完成吗? Ie I need to handle both Inbound and Outbound messages in the client-side application.即我需要在客户端应用程序中处理入站和出站消息。 So if the client is not up how will the messages will be received at Initiator side?那么如果客户端没有启动,消息将如何在 Initiator 端接收? Also in this case how will the Heartbeat messages keep happening since the Initiator is done?同样在这种情况下,自发起程序完成后,心跳消息将如何继续发生? Do I need to run the Initiator in an infinite loop like我是否需要在无限循环中运行发起程序,例如

while {true}而{真}

I am a beginner in java/networking coding and in QuickFIX/J, so pardon if these are very basic questions.我是 java/networking 编码和 QuickFIX/J 的初学者,如果这些是非常基本的问题,请原谅。

  1. Should the initiator be running indefinitely?发起者是否应该无限期地运行? Yes是的
  2. Is initiator dual channel async comms?发起者是双通道异步通信吗? Yes是的
  3. If the client is not up and messages are missed?如果客户端没有启动并且消息丢失? Then QF defaults to the gap fill functionality.然后 QF 默认使用间隙填充功能。
  4. If the client disco what happens to heartbeats?如果客户端迪斯科会发生什么心跳? The reconnection logic kicks in.重新连接逻辑启动。
  5. Do I run the initiator in an infinite loop?我是否在无限循环中运行启动器? No, the application starts its own thread.不,应用程序启动它自己的线程。 You just have to handle the 5 overrides and, if you are message cracking, handle each message type you need to.您只需要处理 5 次覆盖,如果您正在破解消息,请处理您需要的每种消息类型。

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

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