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
Text: Unable to find tagId for DefaultServiceID
Sep 24, 2021 6:21:31 PM com.refinitiv.ema.access.ChannelCallbackClient reactorChannelEventCallback
Text: Received ChannelDownReconnecting event on channel Channel_1
Error Id 0
Internal sysError 0
Error Location Reactor.processWorkerEvent
Error text Error initializing channel: errorId=-1 text=Connection refused
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?
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).
One more question: can method .host() be used to configure OmmConsumer? Something like that:
consumer = EmaFactory.createOmmConsumer(EmaFactory.createOmmConsumerConfig()
I would never recommend hardcoding a specific hostname into an application or config because:
Calling the OmmConsumerConfig.host() method overrides the channelType to RSSL_SOCKET - therefore it is not possible to use the OmmConsumerConfig.host() method to set RTO endpoints (as RTO uses Encrypted ChannelType).
You can still set the RTO hostname and port programmatically by using the technique shown in ex450 which creates a config Map and sets host and port within the Map entries. You can then pass that Map to the OmmConsumerConfig.config() method.
Thank you for the answer. Would you also be so kind as to tell me is there any difference between connecting to the Managed Distribution Service using vpn, ADS ip and service name; and connecting via username, password, clientId like in the 450 example. Could I read the difference somewhere?
For the RTDS + VPN scenario - you would need to have an
For the Real-Time Optimized scenario, the RTDS infrastructure is hosted by us in the cloud and you do not need to deploy any further hardware or software. The RTO feed is Trade Safe Bandwidth optimised one - i.e. delivers up to 3 ticks per second plus all trades. The RTO feed is also lower cost than the full Real-Time feed.
Generally speaking, RTDS is more suitable for organisations that have multiple users, internal publishers etc.
If you want further information, please reach out to your Refinitiv Account team or if you dont have one, then feel free to contact our sales teams - Contact us | Refinitiv