Can we generate FIX messages with consecutive delimiters i.e. with no tag=value in between such as 35=8|49=1234||||||||||||56=ABC| ?
I don’t have that part of the spec handy, but I am sure that this is not allowed. Let me just ask one question: why?
The FIX message would be generated on a FPGA and in my example 49 would have a fixed length so would be padded with SOH
@laurentbrenot if you are dealing with FPGA then I am assuming that latency plays a significant role. If that I the case then I strongly recommend to avoid tagvalue which is a variable length format and has meta-data on the wire as well as field delimiters. FIX Simple Binary Encoding is for high performance environments and primarily fixed length messages. That is what you want to use.
TagValue syntax must consist of tag+"="+value+"|". Neither tag nor value can be empty (see TagValue specification).
See FIX TagValue Encoding specification section “Well-formed field”. Your example violates three rules:
- the tag is empty
- the tag delimiter is missing
- the value is empty
Thank you all for your help.
what about populating tag-number=[N/A] if you have no value instead of concatenating delimiters ?
Dont know exactly whether that would always be applicable but if you have such restrictions it might be worth trying ?
And your message builders in the FPGA are pretty constraint on fields and definetely on the use of groups - arent they ?
I think the delimiters are intended as padding of values to make them fixed length, not for omitting optional tags. Any other character would be deemed as part of the string, hence the proposal to use SOH. Emulating a fixed-length format with a variable length syntax is the issue here. FIX has mostly variable length encodings but SBE does the job in this case.
@hanno.klein I agree, SBE would do the job but I need to replicate the FIX protocol of an exchange, hence my question to “fill the blanks” because variable length is a nightmare when programming a FPGA.
@laurentbrenot have you taken a look at SBE? Is FPGA just for transport? It should be straightforward to convert tagvalue syntax to SBE if you declare everything as string, remove tag and “=” and pad up to the length defined in the SBE schema. At the other end you can put together the tagvalue syntax with the same SBE schema.
Different question, why can’t you use spaces for padding and trim trailing spaces at the other end?
@hanno.klein FPGA generates responses to traders orders in some cases in lieu of the trading exchange. I can’t simply add trailing spaces as the message will be processed by traders’ apps which require the same tag formatting as the trading engine applies. I’ll check if this can be done in two steps.
Why would that app then be able to cope with consecutive delimiters? The trading engine will follow the tagvalue rules and reject your messages if you add delimiters. Also the CheckSum(10) no longer adds up unless you recalculate it. I had assumed that there is something in between to add/remove padding characters.