简体   繁体   English

基于Quick Fix Java的Fix客户端-发送消息和接收响应都需要套接字发起者和接受者

[英]Quick Fix Java based Fix client - Is socket initiator and acceptor both needed for sending messages and receiving response back

I am working on a solution to send FIX messages generated for trades done to a third party system using quick fix java library. 我正在研究一种使用快速修复Java库将为交易完成而生成的FIX消息发送到第三方系统的解决方案。 Third party system will some times send back response for these messages or messages related to these after some time. 第三方系统有时会在一段时间后针对这些消息或与此相关的消息发送回响应。

My understanding is that I just need to start the SocketInitiator to connect to the third party server and send the messages using send method in session. 我的理解是,我只需要启动SocketInitiator即可连接到第三方服务器,并在会话中使用send方法发送消息。 When server sends the message back, I will get the callback in the Application class toApp method. 当服务器发回消息时,我将在Application类的toApp方法中获得回调。

Is my understanding correct or do I need to start the SocketAcceptor in another session to receieve the messages from third party server. 我的理解是正确的还是我需要在另一个会话中启动SocketAcceptor才能接收来自第三方服务器的消息。

Your understanding is correct. 您的理解是正确的。 The SocketInitiator should be enough. SocketInitiator应该足够了。

You can take a look at the Banzai example that comes with the QuickFIX/J library. 您可以看一下QuickFIX / J库随附的Banzai示例 You will see your understanding confirmed in Banzai.java . 您将在Banzai.java中看到您的理解得到确认。

Yes, your understanding is correct. 是的,您的理解是正确的。

Lets have a look at the basic definition. 让我们看一下基本定义。

Initiator : The party which initiates the connection to the remote FIX server (always using an IP address and a port number). 发起方:发起与远程FIX服务器的连接的一方(始终使用IP地址和端口号)。

Acceptor: The party which runs the FIX process and monitors a particular port for incoming FIX connections. 接受者:运行FIX进程并监视特定端口的传入FIX连接的一方。

You need not to set up Socket Acceptor as initiator itself will receive message in callbacks. 您不需要设置Socket Acceptor,因为启动器本身将在回调中接收消息。

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

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