[QFJ-144] What is the intention of the SendResetSeqNumFlag setting? Created: 27/Feb/07 Updated: 03/Mar/07 Resolved: 03/Mar/07 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | None |
Affects Version/s: | 1.0.5 |
Fix Version/s: | None |
Type: | Other | Priority: | Default |
Reporter: | Rob Gilliam | Assignee: | Steve Bate |
Resolution: | Fixed | Votes: | 0 |
Labels: | None |
Description |
What is the intention of the SendResetSeqNumFlag setting? The Java constant for this field is Session.SETTING_RESET_WHEN_INITIATING_LOGON and the Configuration section of the QuickFIx/J User Manual has the description "Send a sequence number reset when initiating a logon" and says the default is "N". This implies (to me) that an initiator session with this flag set should always reset its sequence numbers before logging in, sending a Logon(A) request with and 34=1 and 141=Y every time; it's fairly easy to see why such behaviour shouldn't be the default as it risks undelivered messages from the previous session being lost. However QuickFIX/J actually only seems to use the setting - in Sesson.isResetOnLogonRequested() - to decide whether to set 141=Y in a Logon(A) when the expected sequence numbers for both sides have ALREADY been set to 1, and it has no real effect if ResetOnDisconnect or ResetOnLogout are set, the two most common situations for this, as these cause 141=Y to be set anyway if the sequence numbers have been reset. I would suggest this behaviour IS required in most instances and the default should be "Y". The only other time I can find the setting being checked is in Session.nextLogon(Message) to avoid rejecting an incoming Logon(A) message with the sequence number higher than we expect; not sure why this is the case, although I've not really thought about it. So, what is the desired behaviour? Is there a bug in QuickFIX/J (i.e. should this setting really trigger a Session.reset() every time?) or does the documentation maybe need to be made more specific? |
Comments |
Comment by Steve Bate [ 27/Feb/07 ] |
This has been cleaned up in the trunk (soon to be version 1.1.0). Can you review that code to be sure it resolves your issues? |
Comment by Rob Gilliam [ 27/Feb/07 ] |
So the setting will change to "ResetOnLogon" (Session.SETTING_RESET_ON_LOGON) and this'll reset the sequence numbers before logon (and cause the 141=Y flag to be set)? That looks like what I'm after, thanks. |