question

Upvotes
Accepted
1 0 0 0

EmaConfig.xml when using Java - problem

Hii all,

I am using java and running "gradlew runconsumer100" against "sink_driven_src" for testing purposes.

I am getting the following error: "No data in cache.". I tried to put "EmaConfig.xml enumtype.def RDMFieldDictionary " in "EMA/examples " directory and changed in EmaConfig.xml "Directory_1" to "Directory_2" all over the file.

Can you provide me EmaConfig.xml file which point to local dictionary

and explain me where to put it.

Its became frustrating.


UG

@test75374

elektronrefinitiv-realtimetrepjavasink-driven-source
icon clock
10 |1500

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

Upvote
Accepted
23k 22 9 14

Hello @test75374,

EMA consumer100 does not use XML file-based configuration. It's a hard-coded simplest example.

One option is to use a example that uses XMl config, for example, example 100 (MarketPrice-FileConfig)

There are already file-based dictionary definitions in your emaConfig.xml, for example

<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 will just have to point your consumer (110 uses Consumer_1) such as

<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_1"/>

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

and edit the path to the dictionary you wish to use, for example ./etc/...

The other is to supply to sink_driven_source an option for dfile, for example

-dfile dictFile

If you are running sink_driven_source that is part of Infra Tools package, see doc -> Test Tools Guide with full details on how to pass params.



icon clock
10 |1500

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

Upvote
11.5k 16 7 10

Hello @test75374

The EMA consumer100 uses the Consumer_1 Consumer by default, and connects to the hard-coded server the the example source code.

The Consumer_1 uses a default Dictionary_1 which lets the API download dictionary from the server.

<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_1"/>
    <!-- Dictionary is optional: defaulted to "ChannelDictionary"-->
    <Dictionary value="Dictionary_1"/>
    <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>

You can change the configuration in Consumer_1 to Dictionary_2 which lets the API get dictionary files from local, and set the files location to match your machine.

<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>
icon clock
10 |1500

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

Upvote
9.5k 10 5 7

Hello @test75374

"No data in cache." indicates that your application requests RICs which sink_driven_src does not have. If sink_driven_src loads a canned data which can be downloaded from ELEKTRON SDK - TOOLS, please refer to readme.html file which lists the RICs in the canned data that you can request.

icon clock
10 |1500

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

Click below to post an Idea Post Idea