Skip to content

Extensibility of the Template ID #3

@adkapur

Description

@adkapur

We just had a quick question about the extensibility of the template ID. This is the particular section in the specification which outlines backward compatibility:

Compatibility is only ensured under these conditions:

• Fields may be added to either the root of a message or to a repeating group, but in each case, they must be appended to end of a block.
• Existing fields cannot change data type or move within a message.
• A repeating group may be added, but only after existing groups and if there are no subsequent variable data elements at the end of the message.
• A variable data element may be added, but only after existing groups and data.
• Message header encoding cannot change.

Changes that break those constraints require consumers to update to the current schema used by publishers. In general, metadata changes such as name or description corrections do not break compatibility so long as wire format does not change.

If an enumeration is being used in a particular template ID then do we need to assign a new template ID if additional values are being added to the enumeration? Does this qualify as changing data type of an existing field?

For example NewOrderSingle has template ID 99 with sideEnum containing values 1 & 2 and if we were to add an additional value to this enumeration for cross (8) then will a new template ID be required or it is possible to just update the schema version and utilize the sinceVersion attribute?

    <enum name="sideEnum" encodingType="enumEncoding">
        <validValue name="Buy" description="Buy">1</validValue>
        <validValue name="Sell" description="Sell">2</validValue>
    </enum>

<sbe:message name="NewOrderSingle" id="99" blockLength="54" semanticType="D">
    <field name="ClOrdID" id="11" type="idString" description="Customer Order ID"
           offset="0" semanticType="String"/>
    <field name="Account" id="1" type="idString" description="Account mnemonic"
           offset="8" semanticType="String"/>
    <field name="Symbol" id="55" type="idString" description="Security ID" 
          offset="16" semanticType="String"/>
    <field name="Side" id="54" type="sideEnum" description="Side" offset="24" 
          semanticType="char"/>
    <field name="TransactTime" id="60" type="timestampEncoding" 
          description="Order entry time" offset="25" semanticType="UTCTimestamp"/>
    <field name="OrderQty" id="38" type="qtyEncoding" description="Order quantity"
           offset="33" semanticType="Qty"/>
    <field name="OrdType" id="40" type="ordTypeEnum" description="Order type" 
          offset="37" semanticType="char"/>
    <field name="Price" id="44" type="optionalDecimalEncoding" 
          description="Limit price" offset="38" semanticType="Price"/>
    <field name="StopPx" id="99" type="optionalDecimalEncoding" 
          description="Stop price" offset="46" semanticType="Price"/>
</sbe:message>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions