LSEG Real-Time SDK Proxy Settings

terapon1
terapon1 Newcomer
edited January 15 in EMA

We have been trying to get real time market feed through the following tutorials:

Download Center > Product Family > mds api > LSEG Real-Time SDK

and using the following JAVA example codes

https://github.com/LSEG-API-Samples/Article.EMA.Java.ConsumerRto.V2Auth.ClientCredentials

Since we are under an organization, a proxy setting is required for outside connections. So we went through the example code and found that there is an option to configure proxy.

Under ConsumerRto class > main() , there an options.proxy() method is available but we do not know how to configure it properly. Is this the correct way to configure proxy? Can somebody guide us through this? Could you give us an example of how to configure proxy?

image.png
Tagged:

Best Answer

  • wasin.w
    wasin.w admin
    Answer ✓

    Hello @terapon1

    According to the EMA Java reference guide (available in the SDK package or download here), the proxy relate properties of the ServiceEndpointDiscoveryOption class is as follows:

    • proxyHostName:Specifies the address or hostname of the HTTP proxy server
    • proxyPort: Specifies the port number of the HTTP proxy server
    • proxyUserName: Specifies the proxy user name to authenticate.
    • proxyPassword: Specifies the proxy password to authenticate.

    The properties functions are already described by its name.

    Example: If your environment proxy is

    • corporate-proxy.example.com:8080
    • Proxy username: admin
    • Proxy password: proxy_password1234

    That means:

    • Your proxy hostname is corporate-proxy.example.com
    • Your proxy port is 8080
    • Your proxy username is admin
    • Your proxy password is proxy_password1234

    I hope this information helps.

Answers

  • terapon1
    terapon1 Newcomer

    hi @wasin.w

    I would like to ask further about proxy settings. In the LSEG real-time SDK example, there is another proxy settings near the end of the code. It is part of the OmmConsumerConfig Class.

    image.png

    Apart from the proxy settings at the beginning of the code (ServiceEndpointDiscoveryOption Class). Do I have to configure the proxy at the OmmConsumerConfig Class as well? Why is it necessary to configure proxy 2 times? I was able to get pass the ServiceEndpointDiscoveryOption part but now stuck at the OmmConsumerConfig part. Any recommendations?

    Thanks in advance.

  • Hello @terapon1

    This is the information of those OmmConsumerConfig methods on the EMA Reference Guide document (available in the SDK package).

    restProxy.png

    If your environment has proxy/firewall for the HTTP operations, an application needs to set the REST Proxy information because the API needs to connect to the https://api.refinitiv.com REST API endpoint for authentication.

  • terapon1
    terapon1 Newcomer

    I have set the necessary configurations. The program returns me this specific message that loops every 5 seconds. This means the connection is unsuccessful? Or perhaps the configuration is incorrect?

    image.png
  • Hello @terapon1

    The error message indicates that the API cannot connect to the ADS server via the RSSL connection. An application may need to set the proxy information (hostname, port, username, and password) for the RSSL connection as well (the RTO connection = HTTP REST + RSSL connection).

    I checked on the EMA Java ex450 example, the example code when setting the proxy with the RSSL connection is as follows:

    consumer  = EmaFactory.createOmmConsumer(config.consumerName("Consumer_1").clientId(clientId).clientSecret(clientSecret).config(configDb)
    			.tunnelingProxyHostName(proxyHostName).tunnelingProxyPort(proxyPort)
    			.tunnelingCredentialUserName(proxyUserName).tunnelingCredentialPasswd(proxyPassword).tunnelingCredentialDomain(proxyDomain)
    			.tunnelingCredentialKRB5ConfigFile(proxyKrb5Configfile));
    

    Could you please try to set the tunnelingProxyHostname(), tunnelingProxyPort(), tuennelingCredentialUsername(), and tunnelingCredentialPassword() configurations?

    Example:

    consumer  = EmaFactory.createOmmConsumer(config.consumerName("Consumer_1").clientId(clientId).clientSecret(clientSecret).config(configDb)
    			.tunnelingProxyHostName("corporate-proxy.example.com").tunnelingProxyPort("8080")
    			.tunnelingCredentialUserName("admin").tunnelingCredentialPasswd("proxy_password1234");
    
    proxy.png user_pass.png