Why do I get "errorId=-1 text=Connection refused" while connecting to MMT_DICTIONARY?

Hello!

I try to connect to the MMT_DICTIONARY (332 java example). I extended this example to use username,password and clientId while creating OmmConsumer. But when I start the example I get next output:

> Task :Ema:Examples:runconsumer332
Sep 24, 2021 6:21:31 PM com.refinitiv.ema.access.ConfigErrorTracker log
SEVERE: loggerMsg
ClientName: EmaConfig
Severity: Error
Text: Unable to find tagId for DefaultServiceID
loggerMsgEnd


Sep 24, 2021 6:21:31 PM com.refinitiv.ema.access.ChannelCallbackClient reactorChannelEventCallback
WARNING: loggerMsg
ClientName: ChannelCallbackClient
Severity: Warning
Text: Received ChannelDownReconnecting event on channel Channel_1
RsslReactor @c8c12ac
RsslChannel @6adbc9d
Error Id 0
Internal sysError 0
Error Location Reactor.processWorkerEvent
Error text Error initializing channel: errorId=-1 text=Connection refused
loggerMsgEnd

At the same time I am able to run example 450 with the same username, password and clientId.


Could you please help me to understand what is the problem with MMT_DICTIONARY?

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "umer.nalla"
    Accepted Answer

    Hi @Nikita

    Example 332 does not have the necessary additional code required to connect to the RTO service - it is only designed to connect to a local server.

    You would have to merge the additional service discovery etc with the Data Dictionary request code from example 332 to achieve what you require e.g. it performs service discovery, extracts a host from the list and then uses that and additional information to populate some in-memory config programmatically. It then uses that config as part of the OMMConsumer creation/initialisation.

    A simple example for connecting to RTO is ex113 which uses Session Management facility to do much of the above behind the scenes.

    Also, I have to ask if there is a particular reason for requesting the data Dictionary? EMA does not require the developer to explicitly request and download the dictionary - it does that behind the scenes and uses it to decode the data. You can amend the EMA config to use either local dictionary files or download from the server(the recommended option).