EMA Data Request: Available Services

hujunhu
hujunhu Explorer
consumer.registerClient(
EmaFactory.createReqMsg()
.serviceName("ELEKTRON_AD")
.name("BB.TO"),
eventHandler
);

I am trying to streaming data using the example posted at https://developers.thomsonreuters.com/elektron/elektron-sdk-java/learning?content=8738&type=learning_material_item

And I get the following error "Service name of 'ELEKTRON_AD' is not found"

Running tutorial 2...
Nov 06, 2017 11:53:15 AM com.thomsonreuters.ema.access.ChannelCallbackClient rea
ctorChannelEventCallback
INFO: loggerMsg
ClientName: ChannelCallbackClient
Severity: Info
Text: Received ChannelUp event on channel Channel
Instance Name EmaConsumer_1
Component Version ads2.6.12.L1.linux.tis.rrg 64-bit
loggerMsgEnd

StatusMsg
streamId="0"
domain="MarketPrice Domain"
state="Closed / Suspect / None / 'Service name of 'ELEKTRON_AD' is not found
.'"
name="BB.TO"
serviceName="ELEKTRON_AD"
StatusMsgEnd

May I know all the available serviceName we can use and their differences? It's not mentioned in the tutorial.

Why does this error occur?

Thanks!

Best Answer

  • wasin.w
    wasin.w admin
    Answer ✓

    Hello @hujunhu,

    Please be informed that the service name that you can subscribe data is based on your TREP infrastructure and your permission. I recommend you contact your local Market Data team or Thomson Reuters representative regarding the service name for your subscription.

    You can get the service names available in your ADS/EZD by checking the EMA trace file. The trace file shows incoming/outgoing messages between the API and TREP infrastructure. Please note that it shows the list of your TREP available service names only, you need to check with your local Market Data team or Thomson Reuters representative to verify which service name that you have a permission to subscribe data.

    You can enable the EMA trace file by setting <XmlTraceToStdout value="1"/> in the EmaConfig.xml file.

    <DefaultConsumer value="Consumer_1"/>
    <ConsumerList>
    <Consumer>
    <!-- Name is mandatory -->
    <Name value="Consumer_1"/>

    <!-- Channel is optional: defaulted to "RSSL_SOCKET + localhost + 14002" -->
    <!-- Channel or ChannelSet may be specified -->
    <Channel value="Channel_1"/>

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

    Then you can configure the application to load EmaConfig.xml file by the following code

    String configFile = "<path to config>\\EmaConfig.xml";
    consumer = EmaFactory.createOmmConsumer(EmaFactory.createOmmConsumerConfig(configFile).host("your ADS IP:RSSL Port").username("user"));

    The service names are available in SOURCE REFRESH Response message from TREP. You can find the service name in <elementEntry name="Name" dataType="ASCII_STRING" data="[SERVICE Name]"/> messages. Please see example from my TREP below:

    <!-- Incoming Reactor message -->
    <!-- java.nio.channels.SocketChannel[connected local=/10.42.68.162:64234 remote=/172.20.33.30:14002] -->
    <!-- Mon Nov 06 14:29:52 ICT 2017 -->
    <!-- rwfMajorVer="14" rwfMinorVer="1" -->
    <REFRESH domainType="SOURCE" streamId="2" containerType="MAP" flags="0x168 (HAS_MSG_KEY|SOLICITED|REFRESH_COMPLETE|CLEAR_CACHE)" groupId="0" State: Open/Ok/None - text: "" dataSize="1369">
    <key flags="0x08 (HAS_FILTER)" filter="63"/>
    <dataBody>
    <map flags="0x00" countHint="0" keyPrimitiveType="UINT" containerType="FILTER_LIST" >
    <mapEntry flags="0x00" action="ADD" key="50100" >
    <filterList containerType="ELEMENT_LIST" countHint="0" flags="0x00">
    <filterEntry id="1" action="SET" flags="0x00" containerType="ELEMENT_LIST">
    <elementList flags="0x08 (HAS_STANDARD_DATA)">
    <elementEntry name="Name" dataType="ASCII_STRING" data="ELEKTRON_DD"/>
    <elementEntry name="SupportsQoSRange" dataType="UINT" data="0"/>
    <elementEntry name="Capabilities" dataType="ARRAY">
    <array itemLength="1" primitiveType="UINT">
    <arrayEntry data="5"/>
    <arrayEntry data="6"/>
    <arrayEntry data="7"/>
    <arrayEntry data="8"/>
    <arrayEntry data="9"/>
    ....
    </array>
    </elementEntry>
    <elementEntry name="QoS" dataType="ARRAY">
    <array itemLength="0" primitiveType="QOS">
    <arrayEntry Qos: Realtime/TickByTick/Static - timeInfo: 0 - rateInfo: 0/>
    </array>
    </elementEntry>
    ...
    </filterList>
    </mapEntry>
    <mapEntry flags="0x00" action="ADD" key="2115" >
    <filterList containerType="ELEMENT_LIST" countHint="0" flags="0x00">
    <filterEntry id="1" action="SET" flags="0x00" containerType="ELEMENT_LIST">
    <elementList flags="0x08 (HAS_STANDARD_DATA)">
    <elementEntry name="Name" dataType="ASCII_STRING" data="ELEKTRON_AD"/>
    <elementEntry name="SupportsQoSRange" dataType="UINT" data="0"/>
    <elementEntry name="Capabilities" dataType="ARRAY">
    <array itemLength="1" primitiveType="UINT">
    <arrayEntry data="5"/>
    <arrayEntry data="6"/>
    <arrayEntry data="7"/>
    <arrayEntry data="8"/>
    <arrayEntry data="9"/>
    <arrayEntry data="10"/>
    ...
    </array>
    </elementEntry>
    ...
    </filterList>
    </mapEntry>
    ....
    </mapEntry>
    </map>
    </dataBody>
    </REFRESH>

Answers