apache-camel - 如何为周一至周五的每日 session 配置 QuickFix/J?

标签 apache-camel quickfix fix-protocol quickfixj camel-quickfix

我正在使用QuickFix/J 1.6.4 于 camel-quickfix成分。我想要以下类(class)安排:周一至周五每天上午 6 点至晚上 8 点。因此, session 应于周一上午 6 点开始,并于周一晚上 8 点停止,所有工作日均如此。周六和周日不得有任何 session 登录。

对于这个真正常见的用例,我是否错过了一个简单的配置? 我已经看到了一些 cron 作业等的解决方法,但是有更优雅的方法吗?

我还尝试在每个工作日使用快速修复配置并检查使用哪个配置,但我最终得到了 CannotSendException an 我认为该 session 的实例存在冲突。

最佳答案

由于我要求一个优雅的解决方案,而不是在解决方法之后,答案就是升级到更新的 Camel version 。正如@TT 在他的评论中所写,QuickFix/J版本 2.0.0 及更高版本有 Weekdays configuration .

For daily sessions that are active on specific days of the week. Use in combination with StartTime and EndTime. Incompatible with StartDay and EndDay. If StartTime is before EndTime then the day corresponds to the StartTime.


Comma-delimited list of days of the week in the default locale (e.g. "Sun,Mon,Tue", "Dimanche,Lundi,Mardi" etc.)

自 Camel 2.21.0 起,QuickFix/J 版本 2.0.0 及更高版本包含在 Camel-quickfix 中。例如,您可以在 MVNRepository of camel-quickfix 中看到这一点。 .

关于apache-camel - 如何为周一至周五的每日 session 配置 QuickFix/J?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57406970/

相关文章:

c++ - 开源 FIX 客户端模拟器

quickfix - 如何禁用快速修复验证

kubernetes - Apache 中的日期时间替换 - Camel Kubernetes Yaml 文件

java - ConversionPattern 用于在 JBossFuse/Apache Camel (ops4j) 中记录主机名

java - Apache Camel 程序中的这个变量来自哪里?

quickfix - 更改 FIX 消息中字段的顺序

c++ - FIX 引擎从客户端向服务器发送 FIX 消息的最低延迟是多少?

apache-camel - Camel 消息重新传递未按预期运行

c++ - QuickFix C++ 和 SSL : Issue connecting to LMAX using sTunnel

tls1.2 - QuickFIX/n Bloomberg 配置