简体   繁体   English

是否有使用 QUICKFIX 库的客户端-客户端通信的开箱即用解决方案?

[英]Is there an out of the box solution for Client-Client communication using the QUICKFIX library?

I'm trying to build a entirely contained trading simulator using quickfix/J .我正在尝试使用 quickfix/J 构建一个完全包含的交易模拟器 The systems ought to consist of 2 client applications (a market/exchange and a broker) as well as a router (server/acceptor).该系统应该由 2 个客户端应用程序(一个市场/交易所和一个经纪人)以及一个路由器(服务器/接受者)组成。 In particular I'd like to know:我特别想知道:

  1. Client-Client communication客户-客户沟通

    How the two clients can communicate to each other, but the server handling all the messaging logic, ie.两个客户端如何相互通信,但服务器处理所有消息传递逻辑,即。 messages should go through server and it should decide where and how to forward messages.消息应该 go 通过服务器,它应该决定在哪里以及如何转发消息。 I ought to be able to pass a targetID in FIX message, and the server app should handle routing to desired client.我应该能够在 FIX 消息中传递 targetID,并且服务器应用程序应该处理到所需客户端的路由。

  2. Multiple clients on same port Have multiple clients connected on same port but messages should only go to a particular sender comp Id ie.同一个端口上的多个客户端有多个客户端连接在同一个端口上,但消息应该只 go 到特定的发件人comp Id,即。 clients should not be privy of communication from other clients.客户端不应与其他客户端进行通信。

I've already set up the acceptor, and 2 clients.我已经设置了接受器和 2 个客户端。 I know I could do this programmaticaly using plain old Java but I'd like to leverage the quickfix library and would like a relativly out of the box solution.我知道我可以使用普通的旧 Java 以编程方式执行此操作,但我想利用 quickfix 库并想要一个相对开箱即用的解决方案。

MVP: client (broker) sends fix message through the acceptor(router), message is processed and forwarded to a particular market, market recieves message through server and does some business logic, market sends fix message back to client through acceptor. MVP:客户端(broker)通过acceptor(router)发送fix消息,消息被处理并转发到特定的market,market通过server接收消息并做一些业务逻辑,market通过acceptor将fix消息发送回client。

ps: I like the quickfix library but I'm very flexible if there any other library/languages you'd recommend ps:我喜欢 quickfix 库,但如果您推荐任何其他库/语言,我会非常灵活

Short answer: QuickFIX/J (as far as I can tell similarly QuickFIX or quickfix/n) will not route messages based on tags.简短回答:QuickFIX/J(据我所知,QuickFIX 或 quickfix/n 类似)不会基于标签路由消息。 This has to be implemented in your application code.这必须在您的应用程序代码中实现。

Edit: with regard to your second point.编辑:关于你的第二点。 There is no problem having your FIX server listening for multiple FIX connections on the same port (This applies for QuickFIX/J and I guess also the other language variants.) Sessions are addressed via the SessionID so it is ensured that only the correct FIX Session gets its messages.让您的 FIX 服务器在同一端口上侦听多个 FIX 连接没有问题(这适用于 QuickFIX/J,我猜也适用于其他语言变体。)会话通过SessionID进行寻址,因此确保只有正确的 FIX Session得到它的消息。

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

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