question

Upvotes
Accepted
5 1 3 4

Override location to load dictionary from in ema java

We are attempting to identify origin of latency by subscribing to different layers of our infrastructure.


1. At the client ADS level - from our alias "trep-pcarl..." - this rmdstestclient and the app from which this code snippet is taken - runs ok.


2. When connected to the MFA, The command line run and the app throws this error. It is my understanding that the MFA may not be honoring the dictionary fetch request. How do I perform the "-dfile" override

of the location from which to load the dictionary into my app?



/aim/gfs/quad/cib-market-data-mgmt/trep-tools/${versionLinkName}/vendor/rhel6_x86_64/rmdstestclient -S MBPIPE -h

198.75.43.19 -p 14003 -of stdout -v -m -d 3 -X -a -dfile $RSSLCONSUMER_DICTIONARY -itemList "kyJPM_US_Equity"



echo $RSSLCONSUMER_DICTIONARY

/aim/gfs/quad/cib-market-data-mgmt/trep-dictionaries/prd-namr-carl-a/config/RDMFieldDictionary


Gets an expected result


Java code:


AppClient appClient = new AppClient();

OmmConsumerConfig config = EmaFactory.createOmmConsumerConfig();


String server = "198.75.43.19:14003";

String user = "xxx";

consumer = EmaFactory.createOmmConsumer(config.host(server).username(user));

ReqMsg reqMsg = EmaFactory.createReqMsg();

String source = "MBPIPE";

String symbol = "JPM";

consumer.registerClient(reqMsg.serviceName(source).name(symbol), appClient);

Thread.sleep(60000); // API calls onRefreshMsg(), onUpdateMsg() and onStatusMsg()

}


Thows this error


c 09:28:59.594 [reactor-http-epoll-2] com.jpmorgan.mds.snapcacheExerciser.trep.TrepConnection.connectToTrep(TrepConnection.java:79) INFO com.jpmorgan.m

ds.snapcacheExerciser.trep.TrepConnection - {"maximumSymbols":"5000","now":"2022-05-26T09:28:59.583","server":"198.75.43.19:14003","user":"xxx"}

c 09:29:00.225 [reactor-http-epoll-2] com.refinitiv.ema.access.ChannelCallbackClient.reactorChannelEventCallback(ChannelCallbackClient.java:336) INFO c

om.refinitiv.ema.access.OmmConsumerImpl - loggerMsg

ClientName: ChannelCallbackClient

Severity: Info

Text: Received ChannelUp event on channel Channel

Instance Name EmaConsumer_1

Component Version rfa8.2.0.linux.L1 64-bit

loggerMsgEnd



c 09:29:45.333 [reactor-http-epoll-2] com.refinitiv.ema.access.OmmConsumerImpl.loadDictionary(OmmConsumerImpl.java:523) ERROR com.refinitiv.ema.access.O

mmConsumerImpl - loggerMsg

ClientName: EmaConsumer_1

Severity: Error

Text: dictionary retrieval failed (timed out after waiting 45000 milliseconds) for 198.75.43.19:14003)

loggerMsgEnd



c 09:29:45.339 [reactor-http-epoll-2] com.refinitiv.ema.access.ChannelDictionary.processCallback(DictionaryCallbackClient.java:1170) WARN com.refinitiv

.ema.access.OmmConsumerImpl - loggerMsg

ClientName: C

ClientName: ChannelDictionary

Severity: Warning

Text: RDMDictionary stream was closed with status message

streamId 3

Reason State: Closed/Suspect/None - text: "Login stream was closed."

loggerMsgEnd



c 09:29:45.339 [reactor-http-epoll-2] com.refinitiv.ema.access.ChannelDictionary.processCallback(DictionaryCallbackClient.java:1170) WARN com.refinitiv

.ema.access.OmmConsumerImpl - loggerMsg

ClientName: ChannelDictionary

Severity: Warning

Text: RDMDictionary stream was closed with status message

streamId 4

Reason State: Closed/Suspect/None - text: "Login stream was closed."

loggerMsgEnd



c 09:29:45.353 [reactor-http-epoll-2] com.jpmorgan.moneta.boot.logging.StructuredLogger.info(StructuredLogger.java:37) INFO MONETA_RESPONSE - EVENT=[RE

SPONSE] STATUS=[500]

c 09:29:45.353 [reactor-http-epoll-2] com.jpmorgan.moneta.boot.logging.StructuredLogger.info(StructuredLogger.java:37) INFO MONETA_PERF - EVENT=[WEB] T

IME=[45825]

c 09:29:45.402 [reactor-http-epoll-2] org.springframework.core.log.CompositeLog.error(CompositeLog.java:122) ERROR org.springframework.boot.autoconfigur

e.web.reactive.error.AbstractErrorWebExceptionHandler - [7c13942e-1] 500 Server Error for HTTP GET "/trep/connect"

com.refinitiv.ema.access.OmmInvalidUsageExceptionImpl: dictionary retrieval failed (timed out after waiting 45000 milliseconds) for 198.75.43.19:14003)

at com.refinitiv.ema.access.OmmBaseImpl.ommIUExcept(OmmBaseImpl.java:1636) ~[ema-3.6.5.0.jar!/:emaj3.6.5.L1.all.rrg]

Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:

Error has been observed at the following site(s):

|_ checkpoint ⇢ Handler com.jpmorgan.mds.snapcacheExerciser.controller.Router$$Lambda$447/1136768342@f492092 [DispatcherHandler]

|_ checkpoint ⇢ com.jpmorgan.moneta.boot.logging.reactive.RequestLoggingWebFilter [DefaultWebFilterChain]

|_ checkpoint ⇢ org.springframework.boot.actuate.metrics.web.reactive.server.MetricsWebFilter [D

|_ checkpoint ⇢ HTTP GET "/trep/connect" [ExceptionHandlingWebHandler]

Stack trace:

at com.refinitiv.ema.access.OmmBaseImpl.ommIUExcept(OmmBaseImpl.java:1636) ~[ema-3.6.5.0.jar!/:emaj3.6.5.L1.all.rrg]

at com.refinitiv.ema.access.OmmConsumerImpl.loadDictionary(OmmConsumerImpl.java:525) ~[ema-3.6.5.0.jar!/:emaj3.6.5.L1.all.rrg]

at com.refinitiv.ema.access.OmmConsumerImpl.handleAdminDomains(OmmConsumerImpl.java:618) ~[ema-3.6.5.0.jar!/:emaj3.6.5.L1.all.rrg]

at com.refinitiv.ema.access.OmmBaseImpl.initialize(OmmBaseImpl.java:288) ~[ema-3.6.5.0.jar!/:emaj3.6.5.L1.all.rrg]

at com.refinitiv.ema.access.OmmConsumerImpl.<init>(OmmConsumerImpl.java:47) ~[ema-3.6.5.0.jar!/:emaj3.6.5.L1.all.rrg]

at com.refinitiv.ema.access.EmaFactory.createOmmConsumer(EmaFactory.java:237) ~[ema-3.6.5.0.jar!/:emaj3.6.5.L1.all.rrg]

at com.jpmorgan.mds.snapcacheExerciser.trep.TrepConnection.connectToTrep(TrepConnection.java:84) ~[classes!/:0.0.0-SNAPSHOT]

at com.jpmorgan.mds.snapcacheExerciser.trep.TrepConnection.lambda$connect$0(TrepConnection.java:60) ~[classes!/:0.0.0-SNAPSHOT]

at com.jpmorgan.mds.snapcacheExerciser.trep.TrepConnection$$Lambda$767/227364473.accept(Unknown Source) ~[?:?]

at reactor.core.publisher.FluxCreate.subscribe(FluxCreate.java:94) [reactor-core-3.4.9.jar!/:3.4.9]

at reactor.core.publisher.InternalFluxOperator.subscribe(InternalFluxOperator.java:62) [reactor-core-3.4.9.jar!/:3.4.9]

at org.springframework.http.server.reactive.ChannelSendOperator.subscribe(ChannelSendOperator.java:77) [spring-web-5.3.9.jar!/:5.3.9]

at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) [reactor-core-3.4.9.jar!/:3.4.9]

at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:157) [reactor-core-3.4.9.jar!/:3.4.9]

at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816) [reactor-core-3.4.9.jar!/:3.4.9]

at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:249) [reactor-core-3.4.9.jar!/:3.4.9]

at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:127) [reactor-core-3.4.9.jar!/:3.4.9]

at reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2398) [reactor-core-3.4.9.jar!/:3.4.9]

at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:169) [reactor-core-3.4.9.jar!/:3.4.9]

at reactor.core.publisher.MonoFlatMap$FlatMapInner.onSubscribe(MonoFlatMap.java:238) [reactor-core-3.4.9.jar!/:3.4.9]

at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:96) [reactor-core-3.4.9.jar!/:3.4.9]

at reactor.core.publisher.MonoJust.subscribe(MonoJust.java:55) [reactor-core-3

..

adExecutorMap.java:74) [netty-common-4.1.67.Final.jar!/:4.1.67.Final]

at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.67.Final.jar!/:4.1.67.Final]

at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]

...


ema-apielektron-data-dictionary
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
16.7k 42 12 19

Hi @Patrick Sweeney,

What is MFA?

I would recommend that you start by using the step-by step tutorials described here - https://developers.refinitiv.com/en/api-catalog/refinitiv-real-time-opnsrc/rt-sdk-java/tutorials

All the configuration entries can be moved into the EMA config xml file. To load the data dictionary from local files, define the dictionary entry for your consumer and point that dictionary to load DD from local files:

<Consumer>
   <Name value="Consumer_2"/>
   <Channel value="Channel_2"/>
   <Logger value="Logger_2"/>
   <Dictionary value="Dictionary_2"/>
</Consumer>
...

<Dictionary>
   <Name value="Dictionary_2"/>
   <DictionaryType value="DictionaryType::FileDictionary"/>
   <RdmFieldDictionaryFileName value="./RDMFieldDictionary"/>
   <EnumTypeDefFileName value="./enumtype.def"/>
</Dictionary>
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
5 1 3 4

Thanks for that. In looking at other questions related to mine, people were pointed to "example 350", I will look at that as well.

MFA is a third-party provider of a implementation of the Refinitiv API's, i.e. a publisher. Since the interaction worked with rmdstestclient, the working assumption here is that since it is working correctly and there's an error/missing step in my 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.