无法使用 Spring Boot Starter 启动 FIX 接受器

时间:2021-06-13 13:09:48

标签: java spring spring-boot fix-protocol

我是FiX协议的新手。我偶然发现了这个 spring boot starter,我试图在其中熟悉它https://github.com/esanchezros/quickfixj-spring-boot-starter

我创建了 2 个 Spring Boot 应用程序。目前字面上由主要方法组成,主要类分别用 @EnableQuickFixJClient@EnableQuickFixJServer 注释。

尽管客户端/启动器启动良好,但服务器/接受器应用程序却没有。我收到一个 bean 错误: Consider defining a bean of type 'quickfix.Acceptor' in your configuration. 我知道错误意味着什么,但是在定义 bean 时,我需要传入几个不同的构造函数参数,但我不确定要传入什么。

这些是我的配置:

quickfixj-server.cfg:

[default]
FileStorePath=target/data/acceptor
ConnectionType=acceptor
SenderCompID=EXEC
TargetCompID=BANZAI
StartTime=00:00:00
EndTime=00:00:00
HeartBtInt=5
ReconnectInterval=5
FileLogPath=logs-server

[session]
BeginString=FIX.4.1
SocketAcceptPort=9877

application.properties:

quickfixj.server.config=classpath:quickfixj-server.cfg
quickfixj.server.auto-startup=true 
quickfixj.server.force-disconnect=false 
quickfixj.server.phase=0
quickfixj.server.jmx-enabled=true 
quickfixj.server.concurrent.enabled=true 
quickfixj.server.message-store-factory=memory
quickfixj.server.log-factory=screen

1 个答案:

答案 0 :(得分:0)

这里有一个现成的应用程序,其中包含服务器和客户端的示例(合二为一)。您可以根据自己的需要进行修改,然后在此基础上进行开发。

https://github.com/esanchezros/quickfixj-spring-boot-starter-examples/tree/master/simple-client-and-server

相关问题