question

Upvotes
Accepted
20 0 1 3

Where is the Dictionary loaded in the examples

Hi there,

I'm trying to get a full picture of the role of RDMFieldDictionary and enumtype.def. My understanding is that OOM messages only transfer with the basic which is a set of key/value fields. Therefore that's where the dictionary come in when metadata is required about the key (fid) .


Based on that I don't understand how the examples get there metadata. Looking at runconsumer100 I can't see it loading in any dictionary Yet it seems to output FieldEntry which include the metadata. Do they get automatically loaded some how by the EmaFactory?


> Task :Ema:Examples:runconsumer100
RefreshMsg
    streamId="5"
    domain="MarketPrice Domain"
    solicited
    RefreshComplete
    state="Open / Ok / None / 'Refresh Completed'"
    itemGroup="00 00"
    name="IBM.N"
    serviceId="1"
    serviceName="DIRECT_FEED"
    Payload dataType="FieldList"
        FieldList
            FieldEntry fid="22" name="BID" dataType="Real" value="39.9"
            FieldEntry fid="25" name="ASK" dataType="Real" value="39.94"
            FieldEntry fid="30" name="BIDSIZE" dataType="Real" value="9.0"
            FieldEntry fid="31" name="ASKSIZE" dataType="Real" value="19.0"
        FieldListEnd
    PayloadEnd
RefreshMsgEnd


Thank you,

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-data-dictionary
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Upvotes
Accepted
52.9k 136 44 63

@Neon

EMA internally loads data dictionary. It can be controlled via the configuration file. From the below configurations, the Consumer_1 uses the Dictionary_2 which loads data dictionary from local files.

        <Consumer>
            <!-- Name is mandatory                                                                        -->
            <Name value="Consumer_1"/>

            <!-- Channel is optional: defaulted to "RSSL_SOCKET + localhost + 14002"                    -->
            <!-- Channel or ChannelSet may be specified                                                    -->
            <Channel value="Channel_2"/>

            <!-- Dictionary is optional: defaulted to "ChannelDictionary"                                -->
            <Dictionary value="Dictionary_2"/>
            <XmlTraceToStdout value="0"/>
        </Consumer>
<Dictionary>
            <Name value="Dictionary_1"/>

            <!-- dictionaryType is optional: defaulted to ChannelDictionary" -->
            <!-- possible values: ChannelDictionary, FileDictionary -->
            <!-- if dictionaryType is set to ChannelDictionary, file names are ignored -->
            <DictionaryType value="DictionaryType::ChannelDictionary"/>
        </Dictionary>

        <Dictionary>
            <Name value="Dictionary_2"/>
            <DictionaryType value="DictionaryType::FileDictionary"/>

            <!-- dictionary names are optional: defaulted to RDMFieldDictionary and enumtype.def -->
            <RdmFieldDictionaryFileName value="./RDMFieldDictionary"/>
            <EnumTypeDefFileName value="./enumtype.def"/>
        </Dictionary>

The data dictionary can be loaded from the local files (Dictionary_2) or from the server (Dictionary_1).

The dictionary is used to determine the data type of the field list.

If you set the XmlTraceToStdout in the consumer to 1, you will see the raw data.

<REFRESH domainType="MARKET_PRICE" streamId="3" containerType="FIELD_LIST" flags="0x1E8 (HAS_MSG_KEY|SOLICITED|REFRESH_COMPLETE|HAS_QOS|CLEAR_CACHE)" groupId="1" Qos: Realtime/TickByTick/Static - timeInfo: 0 - rateInfo: 0 State: Open/Ok/None - text: "All is well" dataSize="331">
    <key flags="0x07 (HAS_SERVICE_ID|HAS_NAME|HAS_NAME_TYPE)" serviceId="1" name="IBM.N" nameType="1"/>
    <dataBody>
        <fieldList flags="0x09 (HAS_FIELD_LIST_INFO|HAS_STANDARD_DATA)" fieldListNum="78" dictionaryId="1">
            <fieldEntry fieldId="1" data="19A0"/>
            <fieldEntry fieldId="2" data="42"/>
            <fieldEntry fieldId="3853" data="0481 9468"/>
            <fieldEntry fieldId="3854" data="0509 94D0"/>
            <fieldEntry fieldId="4" data="00"/>
            <fieldEntry fieldId="3855" data="050F F5A0"/>
            <fieldEntry fieldId="6" data="0C00 9B87"/>
            <fieldEntry fieldId="3856" data="082D 7658"/>

From the raw data, there is no type in the field entry, just fieldId and data. Therefore, the data dictionary is required to determine the data type of each field entry.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.