Not receiving updatemsg for some RICS. Please help understand why?

Vinodhini
Vinodhini Newcomer
edited September 1 in EMA

When publishing price for all rics via postmsg. I didn't receive corresponding onupdatemsg for all rics.

I am able to see price on subscribing to rics. However since updatemsg is not always returned after postmsg. Is there any way we can confirm that publishing has been completed successfully?

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Vinodhini

    Thank you for reaching out to us.

    You can set the solicitAck flag in the post message to receive an acknowledgment in response

     PostMsg().postId( postId++ ).serviceName("<Service>")
    .name( "<RIC>" ).solicitAck( true ).
    ….
    

    With this code, the application will receive acknowledgement messages through the onAckMsg method.

    The ackId in the acknowledgment message will match the postId in the original post message. The application should check the NackCode to identify unsuccessful post attempts.

    	if ( ackMsg.hasNackCode() )
    		cout << "Nack Code: " << ackMsg.getNackCodeAsString() << endl;
    
    
  • Thanks you for responding

    I have set solicit ack as true. I am receiving ackMsg but the price is not updated in refinitiv at the point when I am receiving ackMsg. I also noticed I am getting multiple ack msgs. So I changed my code to wait for onupdatemsg which is received post all ackmsg at the end. But I don't receive onupdatemsg for all rics.

    Is this because of any missing configuration?

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Vinodhini

    Are you using off-stream or on-stream postings?

    Please share the code that you are using when positing.

  • IMG_20250901_134023.jpg

    Attaching my code. Please let me know if you any additional details

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Vinodhini

    It looks like to off-stream postings which using a login stream to post messages.

    Therefore, the application will not retrieve update messages of the posted items.

    You may need to subscribe to that item in order to get update messages of that item.

    You can refer to the Cons100 example to subscribe to an item.

  • Thanks

    I am using consumer to subscribe and I see the price is updated in refinitiv while decoding refreshMsg

    I am not sure how long to wait for publishing to complete as I don't get updateMsg..

    Do you have any suggestions?

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Vinodhini

    You can enable tracing in the library by using the XmlTraceToFile configuration of the Consumer to verify what the problem is. For example:

    	<DefaultConsumer value="Consumer_1"/>
    	<ConsumerList>
    		<Consumer>			
    			<Name value="Consumer_1"/>		
    			<Channel value="Channel_1"/>			
    			<Dictionary value="Dictionary_1"/>
    			<XmlTraceToFile value="1"/>
    		</Consumer>
    

    Then, the trace file (EmaTrace_xxx.xml) will be create. Please share the trace file.

  • Hi

    I tried XmlTraceToStdOut and I was able to see some additional logs. But trace file is not getting generated on adding XmlTraceToFile.

    I tried XmlTraceFileName and provided folder location but didn't help.

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Vinodhini

    Do you have a permission to write or create files on that directory?

    Is it EMA Java? Please also check the version of EMA used by the application.

  • Hi

    Yes doesn't look like permission issue

    Using EMA Java version 3.6.4.0

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    EMA 3.6.4 doesn't support the XmlTraceToFile configution.

    Please use the latest one RTSDK Java 2.3.0.L2 (EMA/ETA 3.9.0.L2).

    You can download it from the Software Downloads. It is in the Product family: MDS API and Products; LSEG Real-Time SDK.

  • Thank you. Can we use EMA version 3.9.0.1 ?

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    Yes, you can. It is EMA 3.9.0.L1.

    RTSDK Java 2.3.0.L2 aka EMA/ETA 3.9.0.L2 aka 3.9.0.1
    
  • Attached trace file. Please help analyse and let me know why we are not getting onUpdateMsg for 2 RICs.

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Vinodhini

    I checked the trace file and found that the application subscribed to both RICs after postings.

    <!-- Outgoing Reactor message -->
    <!-- java.nio.channels.SocketChannel[connected local=/10.0.0.2:59109 remote=server1/10.0.0.1:14002] -->
    <!-- Tue Sep 09 15:09:58 IST 2025 -->

    <!-- rwfMajorVer="14" rwfMinorVer="1" -->
    <POST domainType="MARKET_PRICE" streamId="1" containerType="MSG" flags="0x66 (HAS_POST_ID|HAS_MSG_KEY|POST_COMPLETE|ACK)" postId="769174534" postUserId="0" postUserAddr="0.0.0.0" dataSize="21">
    <key flags="0x03 (HAS_SERVICE_ID|HAS_NAME)" serviceId="9" name="XS2900011888=SCFL"/>
    <dataBody>
    <UPDATE domainType="MARKET_PRICE" streamId="0" containerType="FIELD_LIST" flags="0x00" updateType="0" dataSize="10">
    <dataBody>
    <fieldList flags="0x08 (HAS_STANDARD_DATA)">
    <fieldEntry fieldId="393" data="0B00 E840"/>
    </fieldList>
    </dataBody>
    </UPDATE>
    </dataBody>
    </POST>dd

    <!-- Outgoing Reactor message -->
    <!-- java.nio.channels.SocketChannel[connected local=/10.0.0.2:59109 remote=server1/10.0.0.1:14002] -->
    <!-- Tue Sep 09 15:09:58 IST 2025 -->

    <!-- rwfMajorVer="14" rwfMinorVer="1" -->
    <POST domainType="MARKET_PRICE" streamId="1" containerType="MSG" flags="0x66 (HAS_POST_ID|HAS_MSG_KEY|POST_COMPLETE|ACK)" postId="769174535" postUserId="0" postUserAddr="0.0.0.0" dataSize="21">
    <key flags="0x03 (HAS_SERVICE_ID|HAS_NAME)" serviceId="9" name="XS2981236222=SCFL"/>
    <dataBody>
    <UPDATE domainType="MARKET_PRICE" streamId="0" containerType="FIELD_LIST" flags="0x00" updateType="0" dataSize="10">
    <dataBody>
    <fieldList flags="0x08 (HAS_STANDARD_DATA)">
    <fieldEntry fieldId="393" data="0B01 82E7"/>
    </fieldList>
    </dataBody>
    </UPDATE>
    </dataBody>
    </POST>

    The retrieved refresh messages contain the posted data.

    <!-- Incoming Reactor message -->
    <!-- java.nio.channels.SocketChannel[connected local=/10.0.0.2:59109 remote=server1/10.0.0.1:14002] -->
    <!-- Tue Sep 09 15:11:58 IST 2025 -->
    
    <!-- rwfMajorVer="14" rwfMinorVer="1" -->
    <REFRESH domainType="MARKET_PRICE" streamId="5" containerType="FIELD_LIST" flags="0x1FA (HAS_PERM_DATA|HAS_MSG_KEY|HAS_SEQ_NUM|SOLICITED|REFRESH_COMPLETE|HAS_QOS|CLEAR_CACHE)" groupId="2" seqNum="176" permData="0300 1762 20C0" Qos: Realtime/TickByTick/Static - timeInfo: 0 - rateInfo: 0 State: Open/Ok/None - text: "*All is well" dataSize="1362">
        <key flags="0x07 (HAS_SERVICE_ID|HAS_NAME|HAS_NAME_TYPE)" serviceId="23" name="XS2900011888=SCFL" nameType="1"/>
        <dataBody>
            <fieldList flags="0x09 (HAS_FIELD_LIST_INFO|HAS_STANDARD_DATA)" fieldListNum="89" dictionaryId="1">
    …
                <fieldEntry fieldId="393" data="0B00 E840"/>
    …
            </fieldList>
        </dataBody>
    </REFRESH>
    
    <!-- rwfMajorVer="14" rwfMinorVer="1" -->
    <REFRESH domainType="MARKET_PRICE" streamId="6" containerType="FIELD_LIST" flags="0x1FA (HAS_PERM_DATA|HAS_MSG_KEY|HAS_SEQ_NUM|SOLICITED|REFRESH_COMPLETE|HAS_QOS|CLEAR_CACHE)" groupId="2" seqNum="176" permData="0300 1762 20C0" Qos: Realtime/TickByTick/Static - timeInfo: 0 - rateInfo: 0 State: Open/Ok/None - text: "*All is well" dataSize="1363">
        <key flags="0x07 (HAS_SERVICE_ID|HAS_NAME|HAS_NAME_TYPE)" serviceId="23" name="XS2981236222=SCFL" nameType="1"/>
        <dataBody>
            <fieldList flags="0x09 (HAS_FIELD_LIST_INFO|HAS_STANDARD_DATA)" fieldListNum="89" dictionaryId="1">
    …
                <fieldEntry fieldId="393" data="0B01 82E7"/>
            </fieldList>
        </dataBody>
    </REFRESH>
    
    
  • Hi

    I am subscribing to RICs after submitting postMsg after 2 minutes and able to see price in RIC.

    Ideally how long should I wait before I subscribe to check the price? Which message confirms the update is completed in refinitiv ?

    Currently my code waits for updatemsg else it will timeout after 2 minutes and subscribe to check the price for RIC?

    What is your suggestion on the approach?

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Vinodhini

    To get update messages, you need to:

    1. Subscribe to RICs

    2. Wait for the refresh messages of the subscribed RICs

    3. Submit post messages

  • Hi

    I have implemented the same. But I am not getting onUpdateMsg for all RICs consistently though price is published successfully as confirmed from logs.

    Also we see some updatemsg coming after very long time. How long should we wait for updateMsg?

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Vinodhini

    Please share the trace log

    From the previous attached log, the application sent item requests after successful posting.

  • Vinodhini
    Vinodhini Newcomer
    edited September 10

    In the previous attached logs, why are we not seeing updateMsgs ? Is it getting queued in refinitiv?

    Application logic- complete flow

    1. Subscribe to RIC

    2. Wait for refresh msg

    3. Submit post request

    4. Waiting for update msg / timeout if update msg is not received ( Issue is in this step - not receiving updatemsg some times, delay in receiving updatemsg)

    5. Subscribe to RIC

    6. Decode price to check price is published in refinitiv on refreshMsg( No issues. working fine)

    Sorry what do you mean by application sent item request after successful publishing?

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    edited September 10

    If you checked the trace file, you will see the following flow.

    1. <!-- Tue Sep 09 15:09:58 IST 2025 --> Send a post message for XS2900011888=SCFL
    2. <!-- Tue Sep 09 15:09:58 IST 2025 --> Send a post message for XS2981236222=SCFL
    3. <!-- Tue Sep 09 15:09:58 IST 2025 --> Receive an ack message for XS2900011888=SCFL
    4. <!-- Tue Sep 09 15:09:58 IST 2025 --> Receive an ack message for XS2981236222=SCFL
    5. <!-- Tue Sep 09 15:11:58 IST 2025 --> Send an item request for XS2900011888=SCFL
    6. <!-- Tue Sep 09 15:11:58 IST 2025 --> Send an item request for XS2981236222=SCFL
    7. <!-- Tue Sep 09 15:11:58 IST 2025 --> Receive a refresh message for S2900011888=SCFL
    8. <!-- Tue Sep 09 15:11:58 IST 2025 --> Receive a refresh message for XS2981236222=SCFL

    Sending item requests happened after sending post messages.

    When the application calls the registerClient method before the service is ready. The registered items are added into the watchlist. The SDK will send item requests when the service is ready.

    The application needs to submit a post message after retrieving a refresh message of that item. It means that the application needs to send post message at or after the step6: Decode price to check price is published in refinitiv on refreshMsg.

  • Vinodhini
    Vinodhini Newcomer
    edited September 10

    Thanks for your response.

    At step 6 I already confirmed price is published so I don't need to submit postmsg or check updatemsg here.

    I am looking for suggestion at step 4 where I am waiting for confirmation message from refinitiv and I don't receive any response and timeout after 2 minutes.

    Should I change my logic to wait for 2 minutes always rather than waiting for confirmation message if we don't have any mechanism to receive at this stage?

    Do we have any message that can be considered as confirmation of post request ( price update) completion?

    When you say service is not ready . Is it refinitiv service?

    Our application is submitting postmsg after receiving refreshMsg as per step 1,2,3. Wondering why am I not receiving updatemsg in step 4 ?

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    Yes, the service is the subscribed service (IDN_SELECTFEED).

    When the application sends an item request, and the item is valid, it receives a refresh message, followed by update messages. The first message received for a subscribed item must always be a refresh message.

    A refresh message includes both the stream state and data. The stream state indicates whether the stream is open or closed.

    To receive update messages for posted data, the application must send a post message after the item stream has been opened—that is, after receiving the item's refresh message.

    You can verify this from the trace file. The flow should be like this:

    1. Send an item request for XS2900011888=SCFL
    2. Send an item request for XS2981236222=SCFL
    3. Receive a refresh message for S2900011888=SCFL
    4. Receive a refresh message for XS2981236222=SCFL
    5. Send a post message for XS2900011888=SCFL
    6. Send a post message for XS2981236222=SCFL
    7. Receive an ack message for XS2900011888=SCFL
    8. Receive an ack message for XS2981236222=SCFL
    9. Receive an update message for S2900011888=SCFL
    10. Receive an update message for XS2981236222=SCFL
  • Vinodhini
    Vinodhini Newcomer
    edited September 10

    Thanks

    Instead of relying on response as service may or may not be ready, What if I enhance logic to just wait for 2 minutes after postmsg?

    And subscribe to item to check the price is published in refinitiv

    Do you see any issue in this approach?

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    If you would like to check the prices, you can check the data in the published fields in the refresh messages.

    For example, the post messages updates the FID 393.

    image.png

  • In consumer example I see thread.sleep(60000) for publishing field.

    How can I replace this in production application?

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    There are two dispatching modes in EMA.

    • API Dispatch: In this mode, EMA will create a dispatching thread to dispatch messages to the callback methods. Therefore, the application thread (main thread) is free to perform other tasks
    • User Dispatch: In this mode, the application thread (main thread) need to regularly call the dispatch method to dispatch messages. Please check 130_MP_UserDisp

    In API Dispatch mode, the application can perform other tasks or enter a sleep state until it exits, at which point it can carry out cleanup processes.