Search code examples
javaquickfixfix-protocol

When implementing the FAST protocol (from FIX) when should I reset the template parser?


I am implementing my own FAST handler/parser and some templates relies on a previous value of a field, like the copy operation that says: If not present, use the last/previous value received.

Every field has a reset method that clears the previous value of the field.

According to this link: http://jettekfix.com/node/44

You should reset the template after you process every message. Now that's a contradiction, in other words, how am I going to use the previous value of a field if I am resetting it after every message???

I must be missing something here. When should I reset the template parser?


Solution

  • This is not a contradiction if you take into account FAST sequences (i.e. FIX repeating groups). Most exchanges will reset the templates on each messages sent so a participant can join at any point. But inside the same FAST message, fields will be repeated inside a FAST sequence and that's when operations like copy come into play.