Running Elektron-SDK's C++ Example Step5 : 'Service name of 'LDN_RSSL_DDS_CHE' is not found.'

Hello,

STEP1

----------

we installed and configured software named "EZD 1.2" on a computer with Windows Server 2008 R2 Standard operation system. Then we run in command line:

ezd.eze -nodaemon

and we can see the window

image

STEP2

---------

we downloaded
Elektron SDK - C/C++ - 1.1.0 - Windows
and the examples from https://developers.thomsonreuters.com/system/files/EMA Tutorials.zip

Since we are interested in downloading and decoding machine readable news we took the example #5 (MRNConsumer) and changed just one line according to our configuration

OmmConsumer consumer(OmmConsumerConfig().host("my.ip.goes.here:14002").username("my_user_goes_here"));

in the following code

int main( int argc, char* argv[] )
{
try {
AppClient client;
// Create consumer and specify our connectivity parameters + user name
OmmConsumer consumer(OmmConsumerConfig().host("my.ip.goes.here:14002").username("my_user_goes_here"));
// Request NTA domain MRN_STORY type items
consumer.registerClient(ReqMsg().serviceName("LDN_RSSL_DDS_CHE").name("MRN_STORY").domainType(MMT_NEWS_TEXT_ANALYTICS), client); // original
//consumer.registerClient(ReqMsg().serviceName("DIRECT_FEED").name("IBM.N").domainType(MMT_NEWS_TEXT_ANALYTICS), client); // original
// Sleep long enough to receive a few stories
sleep( 60000 );// API calls onRefreshMsg(), onUpdateMsg() and onStatusMsg()

} catch ( const OmmException& excp ) {
cout << excp << endl;
}
return 0;
}

PROBLEM

---------------

When we run MRNConsumer.exe we have the following error in output:

image

QUESTION

----------------

We'd like to download and decode machine readable news, what's wrong in our code?

Thanks in advance

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "warat.boonyanit"
    Accepted Answer

    @mauro.medizza

    Once you call consumer.registerClient(), EMA will create a new thread and start dispatching any message event to the callback using that new thread.

    Your main thread is free to do whatever you want.

    But in the example, it sleep the main thread in order to prevent it from leaving the main function.

    int main( int argc, char* argv[] )
    {
    try {


    AppClient client;
    // Create consumer and specify our connectivity parameters + user name
    OmmConsumer consumer( OmmConsumerConfig().consumerName("Consumer_1").host( "192.168.27.46:14002" ).username( "API.TEST" ) );
    // Request NTA domain MRN_STORY type items
    consumer.registerClient(ReqMsg().serviceName("ELEKTRON_DD").name("MRN_STORY").domainType(MMT_NEWS_TEXT_ANALYTICS), client);
    // Sleep long enough to receive a few stories
    sleep( 60000 ); // API calls onRefreshMsg(), onUpdateMsg() and onStatusMsg()

    } catch ( const OmmException& excp ) {
    cout << excp << endl;
    }
    return 0;
    }

    As you can see, once it sleep for 60 second, the main thread leave the main function and the application is terminated.