Repository navigation
Conversation
Adds the QuickFIX/n RequiresOrigSendingTime setting (default Y). When set to N, a SequenceReset received with PossDupFlag=Y and a MsgSeqNum lower than expected is ignored without validating OrigSendingTime(122), so a counterparty that omits the field on its replayed SequenceResets is not sent a Reject. Every other message type still requires OrigSendingTime when PossDupFlag=Y, and the default behavior is unchanged.
With RejectInvalidMessage=Y, validateField rejected every empty value as "Tag specified without a value" whatever ValidateFieldsHaveValues said, so the setting only relaxed the content pre-pass. It now matches QuickFIX/n (DataDictionary.CheckHasValue and CheckValidFormat): with N an empty value is not rejected for being empty and is not checked against the field's type, while an undefined tag and an empty value for an enumerated field are still rejected. The default (Y) is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two session-validation settings brought in line with QuickFIX/n. Defaults are unchanged for both.
1. Add
RequiresOrigSendingTimeWhy
The FIX spec requires OrigSendingTime(122) whenever PossDupFlag(43)=Y. Some counterparties omit it on the SequenceReset (35=4) messages they replay during resync, where the field means little. QuickFIX/Go rejects every such message whose MsgSeqNum is lower than expected with
35=3 SessionRejectReason=1 RefTagID=122(doTargetTooLowinin_session.go), and there is no setting to turn that off.We hit this connecting to CDNA (Crypto.com | Derivatives North America, formerly Nadex) over FIXT.1.1. CDNA replays 35=4 with 43=Y and no 122 when it resyncs, and it tears the socket down 2 to 3 seconds after it receives our Reject. Our existing C# gateway avoids this with QuickFIX/n's
RequiresOrigSendingTime=N.What it does
Mirrors QuickFIX/n exactly (
Session.DoPossDup, setting nameRequiresOrigSendingTime, introduced for quickfixn issue 102):Y: no behavior change.N, a SequenceReset that reaches the target-too-low path with PossDupFlag=Y is ignored without examining OrigSendingTime: no Reject when 122 is missing, and (as in QuickFIX/n, which returns before the comparison) no SendingTime accuracy check when it is present.The flag is held internally as
SkipOrigSendingTimeOnSequenceResetso the zero value keeps the current default, following theCheckLatency/SkipCheckLatencyprecedent.2. Honor
ValidateFieldsHaveValues=NwhenRejectInvalidMessage=YWhy
ValidateFieldsHaveValues(added in #734) only reached the content pre-pass (validateFieldContent). WithRejectInvalidMessage=Y, the per-field dictionary check (validateField) still rejected every empty value asTag specified without a value, soValidateFieldsHaveValues=Nhad no effect for a session that validates against a data dictionary. Our C# gateway to CDNA runs QuickFIX/n withValidateFieldsHaveValues=Nand full validation.What it does
Mirrors QuickFIX/n (
DataDictionary.CheckHasValueandCheckValidFormat):Y: no behavior change.N, an empty value is not rejected for being empty, and is not checked against the field's type (an empty FLOAT or UTCTIMESTAMP is the application's to interpret).Value is incorrect, as QuickFIX/n'sCheckValuedoes.The
ValidateFieldsHaveValuesdoc inconfig/configuration.gonow says this.Tests
session_factory_test.go: theRequiresOrigSendingTimedefault, andY/Nparsing.in_session_test.go:N: the same message is ignored, no message sent, target seqnum unchanged;N: a too-low PossDup gap fill whose OrigSendingTime is after SendingTime is ignored (QuickFIX/n parity);N: a too-low PossDup NewOrderSingle without 122 is still rejected.validation_test.go, withValidateFieldsHaveValues=NandRejectInvalidMessage=Y, FIX.4.0 and FIXT.1.1/FIX50SP2:Value is incorrect;All seven validation cases fail against v0.9.12. The two Price cases also fail when only the type-check skip is removed. Each new session test fails when the guard in
in_session.gois removed. The last one also fails when the guard drops its SequenceReset condition.