Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QuickFIX/J removes queued FIX messages delivered during out of session time window instead of delivering afterwards #463

Open
barisoztop opened this issue Feb 2, 2022 · 5 comments
Labels

Comments

@barisoztop
Copy link

Describe the bug
I've described the problem here as I was not sure if it is a bug or a regular behavior: (https://stackoverflow.com/q/70953085/1043354)

To Reproduce
Set the StartTime and the EndTime of both initiator and acceptor to a same time period to have some session out window like 20 mins here.:

TimeZone=Asia/Hong_Kong
StartTime=05:40:00
EndTime=05:20:00

Then create a fix message for acceptor in a time range between 05:20:00 to 05:40:00. The acceptor doesn't send this message after the session out window ends and it is removed.

Expected behavior
None of the queued and not sent messages should be removed during session out window.

system information:

  • QFJ Version [2.3.1]
@barisoztop barisoztop added the bug label Feb 2, 2022
@chrjohn
Copy link
Member

chrjohn commented Feb 3, 2022

AFAIK the FIX spec does not tell anything about what happens when messages are sent to a session that is not in existence. The session comes into existence at StartTime. Maybe we should discuss this.

@fedor-prive
Copy link

@chrjohn I wonder if you would consider reviewing and merging a PR that would preserve unsent messaged over EndTime and StartTime and ensure to send them afterwards? Also consider edge case if a message was passed to the library right before EndTime but not sent (ie connection problems), it will also be lost even it was sent on time.

@chrjohn
Copy link
Member

chrjohn commented Mar 11, 2022

@fedor-prive , sorry for the late reply.
Personally speaking I have to admit that I have been affected by this behaviour (store gets lost outside of session time) a few times. So yes, a PR would be very welcome.
Maybe we should make it configurable but OTOH I cannot think of a use case where it would be OK to delete the store when we tried to send messages in between sessions.

@ppmg
Copy link

ppmg commented Mar 23, 2022

Not sure how helpful this is, but it seems someone managed to work around this a few years ago. I haven't tested this, though, so I'm unsure if it's still a workaround. It isn't ideal either, since it involves changing the application behaviour in a way that users might not want.

@chrjohn
Copy link
Member

chrjohn commented Mar 23, 2022

@ppmg , sorry but that SO question is not exactly this problem. There the problem was that the session was reset on every Logon (ResetOnLogon=Y), effectively removing all messages from the store.

Here (i.e. in this issue) the problem is that messages get lost that are sent between two session intervals (i.e. after EndTime but before StartTime) where ResetOnLogon is not enabled.

But in the end both issues probably have the same solution.

Edit: thinking further about it I am not sure if it is desired to have this functionality on a session that resets on Logon. IMHO it is a different use case than having a normal session with StartTime and EndTime. But open to discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants