使用QuickFix / n中的单个启动器的多个SocketConnectionHost锥度 [英] Multiple SocketConnectionHost conectivity using single initiator in QuickFix/n

查看:92
本文介绍了使用QuickFix / n中的单个启动器的多个SocketConnectionHost锥度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我想为每个会话创建一个线程,该线程启动与接受器的连接,并将不同版本的FIX命令发送到定义的接受器,

即`Acceptor1`:接受FIX 4.4命令在SocketConnectPort(接受端口)5001上具有`SocketConnectHost`(IP地址)198.168.1.xx的计算机具有一个创建与acceptor1的连接的线程。

类似于'Acceptor2`:接受FIX4.3顺序另一台计算机有不同的`SocketConnectHost`(IP地址),`SocketConnectPort`和不同的线程。

`initator`包含每个`acceptor`的会话。创建指定的FIX版本顺序时创建线程。可能吗?以及如何实现此功能。

Hello, I want to create per session a thread that initiate connection to the acceptor and send the different version FIX order to the defined acceptor,
i.e. `Acceptor1`: accepting the FIX 4.4 order on Computer having `SocketConnectHost` (IP address) 198.168.1.xx on SocketConnectPort (accepting port) 5001 has one thread that create connection to the acceptor1.
Similarly `Acceptor2` : accepting FIX4.3 order on anothe computer having different `SocketConnectHost` (IP address), `SocketConnectPort`and different thread.
The `initiator` is containing the session for each `acceptor`. Thread is created when the specified FIX version order gets created. Is it possible? and how to achive this functionality.

推荐答案

您可以使用 ThreadedSocketInitiator 并使用2个不同的设置文件来构建2不同的 ThreadedSocketInitiator ,如果你想要或使用不同的启动器,你可以使用相同的 FixApplication 对象。 ThreadedSocketInitiator 将确保仅通过一个线程为特定发起者调用所有 FixApplication 回调。
You can use ThreadedSocketInitiator and use 2 dfferent setting files to construct 2 different ThreadedSocketInitiator, you can use the same FixApplication object if you want or use different for different initiators.ThreadedSocketInitiator will ensure that all the FixApplication callbacks will be called via one thread only for particular initiator.


这篇关于使用QuickFix / n中的单个启动器的多个SocketConnectionHost锥度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆