question

Upvotes
Accepted
3 0 3 4

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

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?

elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-apijava
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
26.4k 62 17 14

The issue has been raised as Real-Time SDK issue 151 in GitHub.

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
11.3k 26 9 14

Hi @sumedh.suede,

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.

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
26.4k 62 17 14

Hello @sumedh.suede

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?


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
3 0 3 4

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 @veerapath.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>
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
3 0 3 4

Hi @wasin.waeosri and @veerapath.rungruengrayubkul

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

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
26.4k 62 17 14

Hello @sumedh.suede

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.

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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.