Do we need to clear the dictionary when the session is reconnected again?

I am running the ETA tutorial4 overnight. The app exited due to an error as follows:

"Received Dictionary Response: RWFFld

Decoding Dictionary failed: Duplicate definition for fid 1.

rsslReactorDispatch() failed: Unknown return code -1 from callback.

Exiting."

What's the best practice to prevent this error? To clear the dictionary before decoding the response? Or just simply discard it?

Thanks.

Best Answer

  • Jirapongse
    Jirapongse admin
    Answer ✓

    I got the same problem when the application reconnected.

    The code could be similar to the VAConsumer example in the Elektron SDK package.

    The VAConsumer deletes the loaded dictionary when the connection is up.

    image

    We will update the ETA tutorial4 to handle this problem.

Answers

  • Thanks, Jirapongse.

    Not sure how often the dictionary is modified/updated. We may just discard the new response, and keep using the existing dictionary.

  • Hi @ayan@jump

    The data dictionary files are typically updated approx 4-6 week intervals, to add or amend field and enum definitions.

    There is a risk that if you use an outdated dictionary to decode a payload with a new field, your application coud throw an exception.

  • Thanks, Umer.

    We will update the dictionary every day. Just hope that there is no intra-day update.