EMA Java - How do I resume a stream that was opened in a paused state?

a0z
a0z Newcomer

This is the last question in https://community.developers.refinitiv.com/questions/62900/ema-java-is-it-possible-to-open-a-stream-in-a-paus.html

To summarize, after sending a paused register request below

long handle = consumer.registerClient(EmaFactory.createReqMsg().pause(true)...); 

the following request would only trigger one single RefreshMsg to be sent, no messages after that, it's as though the stream were still paused.

consumer.reissue(EmaFactory.createReqMsg().pause(false), handle); 

How do I put the stream back to an unpaused state so that all subsequent messages would be received?

Welcome!

It looks like you're new here. Sign in or register to get started.

Best Answer

Answers

  • Hi @a0z,

    Sorry. I miss your question. You can resume a stream using the following code.

    consumer.reissue(EmaFactory.createReqMsg().initialImage(false).interestAfterRefresh(true), handle);

    EDIT: I have tried this on EMA 1.5 but it seems not work. The reissue still is sent with pause flag.

  • Hello @a0z

    Could you please enable the XML trace log and share your trace when the problem occurs? You can set the XML trace by setting <XmlTraceToStdout value="1"/> in the EmaConfig.xml file?


  • a0z
    a0z Newcomer

    I tried

    long handle = ommConsumer.registerClient(EmaFactory.createReqMsg().serviceName("XXX").name("EUR=").pause(true));

    ommConsumer.reissue(EmaFactory.createReqMsg().pause(false).initialImage(false).interestAfterRefresh(true), handle);

    Below is the redacted XML trace, as @a0zveerapath.rungruengrayubkul said, the pause flag was still set in the resume request.

    <!-- Outgoing Reactor message -->
    <!-- java.nio.channels.SocketChannel[connected local=/10.222.9.245:40162 remote=/10.220.65.193:14002] -->
    <!-- Fri Aug 14 10:40:25 BST 2020 -->
    <!-- rwfMajorVer="14" rwfMinorVer="1" -->
    <REQUEST domainType="MARKET_PRICE" streamId="5" containerType="NO_DATA" flags="0x246 (HAS_PRIORITY|STREAMING|HAS_QOS|PAUSE)" Qos: Realtime/TickByTick/Static - timeInfo: 0 - rateInfo: 0 priorityClass="1" priorityCount="1" dataSize="0">
        <key flags="0x03 (HAS_SERVICE_ID|HAS_NAME)" serviceId="000" name="EUR="/>
        <dataBody>
        </dataBody>
    </REQUEST>


    <!-- Incoming Reactor message -->
    <!-- java.nio.channels.SocketChannel[connected local=/10.222.9.245:40162 remote=/10.220.65.193:14002] -->
    <!-- Fri Aug 14 10:40:25 BST 2020 -->
    <!-- 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="5" seqNum="53710" permData="XXXX XXXX XX" Qos: Realtime/TickByTick/Static - timeInfo: 0 - rateInfo: 0 State: Open/Ok/None - text: "All is well" dataSize="2071">
        <key flags="0x07 (HAS_SERVICE_ID|HAS_NAME|HAS_NAME_TYPE)" serviceId="000" name="EUR=" nameType="1"/>
        <dataBody>
            <fieldList flags="0x09 (HAS_FIELD_LIST_INFO|HAS_STANDARD_DATA)" fieldListNum="99" dictionaryId="1">
                <fieldEntry fieldId="1" data="XXXX"/>
            </fieldList>
        </dataBody>
    </REFRESH>
    <!-- Outgoing Reactor message -->
    <!-- java.nio.channels.SocketChannel[connected local=/10.222.9.245:40162 remote=/10.220.65.193:14002] -->
    <!-- Fri Aug 14 10:40:50 BST 2020 -->
    <!-- rwfMajorVer="14" rwfMinorVer="1" -->
    <REQUEST domainType="MARKET_PRICE" streamId="5" containerType="NO_DATA" flags="0x266 (HAS_PRIORITY|STREAMING|NO_REFRESH|HAS_QOS|PAUSE)" Qos: Realtime/TickByTick/Static - timeInfo: 0 - rateInfo: 0 priorityClass="1" priorityCount="1" dataSize="0">
        <key flags="0x03 (HAS_SERVICE_ID|HAS_NAME)" serviceId="000" name="EUR="/>
        <dataBody>
        </dataBody>
    </REQUEST>
  • a0z
    a0z Newcomer

    Hi @ayan@jumpwasin.waeosri and @a0zveerapath.rungruengrayubkul

    Is this a bug that I need to raise on GitHub?

  • Hello @a0z

    Yes, I have tested the same code and got the same XML stack trace and API behavior.

    I suggest you submit an issue to development team in GitHub issue page directly.

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.