Table of contents

 

The first bit (after stop bit) of Presence Map in any message shows presence of templateID which is required to define template for our message. Template ID uses an implicit copy operator. So if this first bit is 1, then the Template ID is present in the stream, and if the bit is 0, then the Template ID is the same as the Template ID of the previous message. In any case, we must always determine templateID as it is required for decoding the FAST message.

In our example, template ID is present in the stream, as illustrated below:

Presence of TemplateID PMap bit

Picture 3.6 – “Presence of TemplateID PMap bit”

The template ID field follows the PMap, so extracting the template ID is the second step of the FAST decoding process. The decoder will retrieve the correct FAST message template using the extracted template ID, then use that template to decode the rest of the FAST message.

The same FAST message template is shared between the FAST encoder and decoder (typically the message producer and consumer). This relationship is depicted in the following diagram.

Message template relationship

Picture 3.7 – “Message template relationship”