I'm using ETA C API in Linux.
Here are some background information on my application and information I received from Reuters tech support assigned for my project regarding the EaaS site.
I would like to get recommendation on the following options:
1. Use one data dictionary to decode data from ADS in different data center. I’m planning to use the data dictionary downloaded from the first connections and reuse it across connections. Download data dictionary only when the ADS where I have open subscription gets restarted.
dictionaryEntry = dictionary->entriesArray[fEntry->fieldId];
2. Download data dictionaries from all connections (provided I make connection to different data center)
Would it be safe to use old dictionary in case market price updates with new FIDs arrives from other ADS connections ?
Yes, if the application properly handles null value returned from dictionary->entriesArray[fEntry->fieldId].
dictionary->entriesArray supports FID between -32768 and 32767. Therefore, if the verified FID is in this range, it will not be out of bounds. However, the application must verify the return value of dictionary->entriesArray[fEntry->fieldId]. If it is null, it means that the loaded data dictionary doesn't contain that FID so the application must not accessing its value.
Is there any way to skip lookup of new FIDs that are not in dictionary by checking against the size of dictionary ?
I don't think so. You need to verify the return value of dictionary->entriesArray[fEntry->fieldId]. If it is null, you can skip decoding.
Would it be safe to maintain per connection data dictionary , use the latest version, and update if new version is downloaded after ADS re-start ?
Yes, you can do it. However, instead of downloading dictionaries from all connections, you and send the dictionary requests with RDM_DICTIONARY_INFO filter to all connections.
msg.msgBase.msgKey.filter = RDM_DICTIONARY_INFO;
With this filter, the dictionary response will contain only the version of dictionary on EaaS.
<refreshMsg domainType="RSSL_DMT_DICTIONARY" streamId="3" containerType="RSSL_DT_SERIES" flags="0x168" groupId="0" dataState="RSSL_DATA_OK" streamState="RSSL_STREAM_NON_STREAMING" code="RSSL_SC_NONE" text="" dataSize="50"> <key flags="0xF" serviceId="2115" name="RWFFld" nameType="1" filter="0"/> <dataBody> <series flags="0x2 (RSSL_SRF_HAS_SUMMARY_DATA)" countHint="0" containerType="RSSL_DT_ELEMENT_LIST"> <summaryData> <elementList flags="0x8 (RSSL_ELF_HAS_STANDARD_DATA)"> <elementEntry name="Type" dataType="RSSL_DT_UINT" data "1"/> <elementEntry name="DictionaryId" dataType="RSSL_DT_INT" data="1"/> <elementEntry name="Version" dataType="RSSL_DT_ASCII_STRING" data="4.20.29"/> </elementList> </summaryData> </series> </dataBody> </refreshMsg>
After that, you can choose the one with the newest version and then send a dictionary request with RDM_DICTIONARY_NORMAL filter to get the dictionary.