如何配置QuickFix/J周一到周五的每日会话?

How to configure QuickFix/J for daily sessions from Monday to Friday?

我正在使用 QuickFix/J 1.6.4 in camel-quickfix 组件。我想要以下 session 时间表:每天 session 从周一到周五早上 6 点到晚上 8 点 。所以 session 应该在星期一早上 6 点开始,在星期一晚上 8 点停止,所有工作日都是如此。周六和周日不会有任何Session登录。

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

我还尝试在每个工作日使用 quickfix 配置并检查使用哪个,但我最终 我认为那个 session 的实例有冲突.

由于我要求的是一个优雅的解决方案,而不是在解决方法之后,所以答案是 升级到更新的 Camel version. As @TT had written in his comment, QuickFix/J version 2.0.0 and newer have the 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.)

QuickFix/J 自 Camel 2.21.0 以来,camel-quickfix 包含了 2.0.0 版和更新版本。例如,您可以在 MVNRepository of camel-quickfix.

中看到这一点