question

Upvotes
Accepted
27 5 11 11

ChainStepByStepExample maven dependencies

Hi All,

I am trying to build the java project (doing ChainStepByStepExample). Can anybody please let me know the maven dependency required for com.thomsonreuters.platformservices.elektron

https://github.com/Refinitiv-API-Samples/Example.EMA.Java.ValueAddObjectsForEMA

Thanks

Dhruv

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-apimaven
icon clock
10 |1500

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

Upvotes
Accepted
32.2k 40 11 19

Modifications to ChainStepByStepExample to get it running with ERT:

Additional library references:

Config for encrypted channel added for EmaConfig.xml in Consumers section:

<Consumer>
            <Name value="Consumer_3"/>

            <!-- Channel set to "RSSL_ENCRYPTED"                                                        -->
            <Channel value="Channel_4"/>

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

In Channels:

<Channel>
            <Name value="Channel_4"/>
            <ChannelType value="ChannelType::RSSL_ENCRYPTED"/>
            <CompressionType value="CompressionType::None"/>
            <GuaranteedOutputBuffers value="5000"/>
            <!-- EMA discovers a host and a port from EDP-RT service discovery for the specified location 
                 when both of them are not set and the session management is enable. -->
            <Location value="us-east"/>
            <EnableSessionManagement value="1"/>
            <CompressionThreshold value="300"/>  
            <!-- ObjectName is optional: defaulted to ""                                                -->
            <ObjectName value=""/>
        </Channel>

Code changes:

//    private static final String SERVICE_NAME = "ELEKTRON_EDGE";
    private static final String SERVICE_NAME = "ELEKTRON_DD";

And later:

      try
        {
            OmmConsumerConfig config = EmaFactory.createOmmConsumerConfig()
                    .operationModel(operationModel);
            config.clientId(clientId);
            config.tunnelingKeyStoreFile(tunnelingKeyStoreFile);
            config.tunnelingSecurityProtocol("TLS");
            config.tunnelingKeyStorePasswd(tunnelingKeyStorePasswd);
            
            if(!DACS_USER_NAME.isEmpty())
            {
                config.username(DACS_USER_NAME);
            }
            
//            ommConsumer = EmaFactory.createOmmConsumer(config);
            ommConsumer = EmaFactory.createOmmConsumer(config.consumerName("Consumer_3").username(username).password(password));

Does this help?






lib20200818-2.gif (43.4 KiB)
icon clock
10 |1500

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

Upvotes
32.2k 40 11 19

Hello @dhruv.arora,

I can try to mention a way that I think will be most helpful to you, first. The example includes NetBeans project. After I have downloaded and imported the project into my NetBeans IDE.

1. Repointed all Elektron SDK libraries included with the project already, with older versions, to my installed ESDK 1.5 versions of the same libraries:

2. The only reference missing for me, turned out to be the last httpcore. That I added separately.

There is also, in nbprojects/project.properties file, the list javac.classpath, that can be used as a starting point for maven, but if you have the latest ESDK, this will likely be outdated, you may need to update the versions.

In my opinion, using the included project is the quickest and easiest starting point to get all the dependencies correctly.


libs20200818.gif (31.6 KiB)
icon clock
10 |1500

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

Upvotes
27 5 11 11

Thanks Zoya. I have not been able to authenticate to the service. I am giving "GE-A-01444311-3-2480" as Host value in EmaConfig.xml. do you know, where to provide the password and client id? I am getting the following error:

ERROR - Can't create the OmmConsumer because of the following error: login failed (timed out after waiting 45000 milliseconds) for GE-A-01444311-3-2480:14002)

>>> Exiting the application

icon clock
10 |1500

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

Upvotes
32.2k 40 11 19

Hello @dhruv.arora,

Your connectivity endpoint via machineId is ERT, via encrypted channel.

The example call class ChainStepByStepExample, before parsing chain, actuates classic connectivity via classic RSSL channel. Which is where DACS_USER comes in.

The example uses EmaConfig.xml included, with a single default consumer definition, that points into that infrastructure.

So just passing creds will not help. Need to:

  • First connect via encrypted channel
  • And next, the chain requesting and parsing code can be reused.

I can suggest quick modifications to ChainStepByStepExample to get it running with ERT. Quick replace, rather then a generic multi-infra-type-select example?

Or you can use examples EMA 113 or 450 that came with ESDK to setup a channel and then merge the parsing code.

icon clock
10 |1500

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

Upvotes
27 5 11 11

Thanks a lot Zoya.

icon clock
10 |1500

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