Ema Cons113 dictionary retrieval failed

jxu2
jxu2 Newcomer

When debugging the code, the following error was reported. Why?

Exception Type='OmmInvalidUsageException', Text='dictionary retrieval failed (timed out after waiting 45000 milliseconds) for :)', ErrorCode='-4055'

Best Answer

  • wasin.w
    wasin.w admin
    Answer ✓

    Hello @jxu2

    The API automatically downloads the dictionary information from the server (RTO or deployed RTDS server) for the application by default. The default timeout value of this operation is 45000 milliseconds.

    When you debug the code, the breakpoint or debugging process might interrupt the dictionary download process until it reaches the timeout.

    You can set the EMA Application to load local dictionary files instead via the Dictionary and DictionaryType parameters.

    Example:

    <Consumer>
       <Name value="Consumer_4"/>
       <Channel value="Channel_4"/>
       <Dictionary value="Dictionary_2"/>
       ...
    </Consumer>
    ...
    <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>

    You can find more detail in the "Dictionary Types" section of the Enterprise Message API (EMA) - Configuration Overview article.

    Note: The dictionary files (RDMFieldDictionary and enumtype.def) are available in the etc folder of the SDK package.


Answers

  • jxu2
    jxu2 Newcomer

    I set <Dictionary value="Dictionary_2"/> and restart the program, the following error was reported:

    Exception Type='OmmInvalidUsageException', Text='DictionaryCallbackClient::loadDictionaryFromFile() failed.

    Unable to load RDMFieldDictionary from file named ./RDMFieldDictionary

    or load enumtype.def from file named ./enumtype.def', ErrorCode='-1'


    how to download the RDMFieldDictionary and enumtype.def to my local folder.

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @jxu2

    The dictionary files (RDMFieldDictionary and enumtype.def) are available in the API package. They are in the etc folder.

    1659495224381.png

    Otherwise, you can get them from https://github.com/Refinitiv/Real-Time-SDK/tree/master/Cpp-C/etc.

    Copy those files to the working directory of the application or specify the absolute paths in the configuration.

  • jxu2
    jxu2 Newcomer

    These dictionary files are permanently unchanged? if not, how to get the updated files?

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @jxu2

    The files can be updated by adding new fields. You can get the latest version from the Software Download in MyRefinitiv.

    1659500557733.png

    It is in the MDS - General, and Refinitiv Real-Time Template Service Pack categories.

    However, new fields may be used by specific RICs or exchanges. If you see the error (FieldIdNotFound) when parsing the data, it means that you need to update the dictionary files.

  • Hello @jxu2

    Please be informed that the dictionary information on the consumer side should match with the Provider (deployed RTDS or RTO).

    I am assuming that the issue occurs only when you debug/set the breakpoints in the Cons113 example code. I recommend you use the Dictionary Type "DictionaryType::ChannelDictionary" in the production use to download the dictionary from the Provider.