-
Notifications
You must be signed in to change notification settings - Fork 21
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
Invalid FIX Message Header #4
Comments
This is expected behaviour the FixMessageBuilder doesn't enforce order of fields. Fields are written in the order that they are appended to the builder. JavaDoc and test added. |
I have to say I disagree Fix version, body length, message type, and checksum are the only fields in fix messages that have to be in a certain position. Fix version, body length, and checksum all have their positions determined internally to the FixMessageBuilder (not by when they are appended), whilst message type is not, which provides an inconsistency with the api. Fields where order matters should all be treated the same. |
When using the FixMessageBuilder object, if you're building a fix message whose message type is not predefined in the MsgType object then you have to use the append() method the builder provides. If the first call to the builder is not appending the MsgType, then the fix message produced is invalid (MsgType will not be the 3rd fix tag.
Valid Message:
8=FIX.4.2|9=64|35=4|123=Y|36=10|56=tom|49=JUDD|52=20160808-12:02:50.967|34=100|10=237|
Invalid Message:
8=FIX.4.2|9=64|34=100|123=Y|35=4|36=10|56=tom|49=JUDD|52=20160808-12:02:50.967|10=237|
The Standard Message Header for FIX defines that MsgType should be the third field in a message (http://btobits.com/fixopaedia/fixdic44/index.html)
The text was updated successfully, but these errors were encountered: