Is there a possibility of not getting a reply for a RIC and not getting reply of status closed?

I'm querying a multiple chaniend RIC and the process gets stuck after sometime. However the statusMsg.state is not closed, How to validate if the reply was sent and if the status was closed for a RIC ?

My current logic is :

post the batch request and wait for the refreshMsg.status to be true or check statusMsg.state having "CLOSED" string in it.

Problem is that is does not receive the refreshMsg nor it obtains the status as closed. Can you please advise.

Best Answer

  • nick.zincone
    Answer ✓

    For the RICs you provided, 0#1US+ and 1US1855V7, both return a refreshMsg with an Ok dataState (see below) when I request for each one individually. When you request for 0#1US+, it is a chain. EMA does not automatically expand chains and request the constituents on your behalf. You have to programmatically perform this task yourself.

    If you are unfamiliar with chains and their processing, you can review Decoding Chains articles which goes into depths about how they are organized and processing recommendations.

    RefreshMsg
    streamId="6"
    domain="MarketPrice Domain"
    Solicited
    RefreshComplete
    ClearCache
    state="Non-streaming / Ok / None / 'All is well'"
    itemGroup="00 00"
    permissionData="03 01 64 31 53 C0"
    qos="RealTime/TickByTick"
    seqNum="112"
    name="0#1US+"
    nameType="1"
    serviceId="356"
    serviceName="ELEKTRON_AD"
    Payload dataType="FieldList"

    RefreshMsg
    streamId="6"
    domain="MarketPrice Domain"
    Solicited
    RefreshComplete
    ClearCache
    state="Non-streaming / Ok / None / 'All is well'"
    itemGroup="00 00"
    permissionData="03 01 64 31 53 C0"
    qos="RealTime/TickByTick"
    seqNum="768"
    name="1US1855V7"
    nameType="1"
    serviceId="356"
    serviceName="ELEKTRON_AD"
    Payload dataType="FieldList"

Answers

  • Hi @sagar.s,

    Does your logic utilize the onStatusMsg() callback? If any of the items in your batch are invalid for example, you'll will not receive a refreshMsg with a status. You will receive a statusMsg indicating the issue.

  • It utilizes statusMsg.state().streamStateAsString().contains("CLOSED"). However, the RIC is valid.

    Is there any other keywords I should be checking?

    Should I reissue the RIC request if the above statusMsg is not received or if there is no status on refreshMSg?

  • Hi @sagar.s,

    When an item is closed, your statusMsg looks like this:

    StatusMsg
    streamId="6"
    domain="MarketPrice Domain"
    state="Closed / Suspect / Not found / 'The record could not be found'"
    name="JUNK.TEST"
    nameType="1"
    serviceId="356"
    serviceName="ELEKTRON_AD"
    StatusMsgEnd

    Perhaps it could be a string comparison/case issue? You are looking specifically for "CLOSED". Can you provide us the output of what you are seeing?

  • Hi @sagar.s,

    You should always receive something whether valid or invalid. Can you provide the RIC? Are you receiving a refreshMsg for this RIC?

  • I do not think it is a string comparison issue. Since the issue is intermittent. Sometimes I receive all the chaned RICs reply. But sometimes it doesn't get a reply.

    However, I can check change the string comparison to be case insensitive and test as well.

  • For example, I have a RIC 0#1US+ . For the current run it doesn't get reply for 1US1855V7

  • Ok - I see in your original question you are processing the chain (got confused with the spelling "chaniend" :-). In this case, I would turn on XmlTrace to see what you are receiving. Within your EmaConfig.xml, you can enable with this:

    <XmlTraceToFile value="1"/>

    You will see alot of initial output for your dictionary download.

  • Sorry about the typo. I'll try the XML trace option. I tested the string comparison case issue. It is not failing due to that. Thanks Nick!

  • Hello @sagar.s
    "

    EMA Java provides XmlTraceToStdout Consumer entry parameter to specify whether EMA traces its messages in XML format to stdout. Please set the parameter to 1 to turn on tracing to stdout. For example:

    <Consumer>
    <Name value="Consumer_1"/>
    ...
    <XmlTraceToStdout value="1"/>
    </Consumer>

    Then, please attach the output so that we can know what message the application receives instead of refresh messages when the problem occurs.

  • Hi Pimchaya... thanks for the suggestion... I'll reach out to you with details.

  • Hi @sagar.s

    Does the problem still occur? If so, please attach EMA trace log.

    Note:The EMA trace log shown on the console can be long so please redirect your application command output to
    a file as the syntax below:

    Java_command_line_runing_your_application
    > output_file_name

  • It seemed like a logical issue. I rewrote the logic. Its working now. Thanks for the help! This issue can be closed.

    Thanks,

    Sagar