question

Upvotes
Accepted
1 2 3 5

Ema Cons113 dictionary retrieval failed

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'

ema-apiconsumerdirectory
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.

hi @jxu2 ,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

Upvotes
Accepted
24.7k 54 17 14

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.


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.

Upvotes
1 2 3 5

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.

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.

Upvotes
79.1k 250 52 74

@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.


1659495224381.png (14.9 KiB)
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.

Upvotes
1 2 3 5

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

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.

Upvotes
79.1k 250 52 74

@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.


1659500557733.png (42.0 KiB)
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.

Upvotes
24.7k 54 17 14

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.

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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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