How do I know Snapshot request using EMA api is fulfilled or completed

Mani.A
Mani.A Explorer

Hi,

I ran the sample Sample code series100/ex102_MP_Snapshot/Consumer.java to get a Snapshot for a RIC. And I got the below response.

inside onRefreshMsg method ..
RefreshMsg
    streamId="5"
    domain="MarketPrice Domain"
    solicited
    RefreshComplete
    state="Non-streaming / Ok / None / 'All is well'"
    itemGroup="00 01"
    permissionData="03 01 01 52 6c"
    name="JPY="
    nameType="1"
    serviceId="257"
    serviceName="IDN_RDF"
    Payload dataType="FieldList"
        FieldList FieldListNum="99" DictionaryId="1"
            FieldEntry fid="1" name="PROD_PERM" dataType="UInt" value="526"
            FieldEntry fid="2" name="RDNDISPLAY" dataType="UInt" value="153"
            FieldEntry fid="3" name="DSPLY_NAME" dataType="Rmtes" value="ASANPACIFIBK MOW"
            FieldEntry fid="5" name="TIMACT" dataType="Time" value="18:30:00:000:000:000"
            FieldEntry fid="11" name="NETCHNG_1" dataType="Real" value="0.47"
           ...
           ...
           ...
<rest of fields snipped>
        FieldListEnd
    PayloadEnd
RefreshMsgEnd


How do I know the Snapshot request is completed ? Is RefreshComplete in the above output means that request is fulfilled ? I could not find any method that in the RefreshMsg interface to get hold of this RefreshComplete message ? Any help is appreciated

Thanks in advance

Mani

Best Answer

  • Gurpreet
    Gurpreet admin
    Answer ✓

    Hi @Mani.A,

    Yes, the RefreshComplete attribute of the Refresh message is the indicator that the refresh is complete.

    You can query the complete() function in the Refresh object:

    boolean isComplete = RefreshMsg.complete();

    Please note that Refresh Message can be sent in multiple parts, if it is too large (for e.g. Level 2 order books). Only the final update of the refresh will contain the complete attribute.

Answers

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.