question

Upvotes
Accepted
3 1 1 1

Snapshot in EMA

Hello,

We change API from RFA to EMA to connect to Reuters servers.

When we request IDN_SELECTFEED.ANY.INUSNDS.NaE by executing snapshot feature,EMA abnormally ends with a CORE file and outputs the following message in the log file.

"terminate called after throwing an instance of 'thomsonreuters::ema::access::OmmInvalidUsageExceptionImpl'"

According to our investigation, the error message is generated by Elektron-SDK1.2.1.linux.rrg/Cpp-C/Ema/Src/Access/Impl/OmmInvalidUsageExceptionImpl.cpp.

Are there any differencies between RFA and EMA as for how to execute the snapshot feature?

The error message occurs in case that we use EMA in Linux server, but in case that we use RFA in Solaris server, there is no error message.

Best Regards,
Shoichi Takii

elektronrefinitiv-realtimeelektron-sdkrrtrfaema-apielektron-message-apilinuxsnapshot-pricingsolaris
icon clock
10 |1500

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

Upvotes
Accepted
7.6k 15 6 9

@Takii

Can you please test the RIC with our Consumer examples such as 200__MarketPrice__Streaming or 100__MarketPrice__Streaming?

Below is a test result when using the RIC with the example from the latest version of ESDK. I just set interestAfterRefresh(false) in the codes.


RefreshMsg
    streamId="5"
    domain="MarketPrice Domain"
    Solicited
    RefreshComplete
    ClearCache
    state="Non-streaming / Ok / None / 'All is well'"
    itemGroup="00 01"
    permissionData="03 01 01 26 68 C0"
    qos="RealTime/TickByTick"
    seqNum="32"
    name="INUSNDS"
    nameType="1"
    serviceId="257"
    serviceName="ELEKTRON_DD"
    Payload dataType="FieldList"
        FieldList FieldListNum="85" DictionaryId="1"
            FieldEntry fid="1" name="PROD_PERM" dataType="UInt" value="2668"
            FieldEntry fid="2" name="RDNDISPLAY" dataType="UInt" value="(blank data)"
            FieldEntry fid="3" name="DSPLY_NAME" dataType="Rmtes" value="INR US NDS      "
            FieldEntry fid="4" name="RDN_EXCHID" dataType="Enum" value="(blank data)"
            FieldEntry fid="5" name="TIMACT" dataType="Time" value="(blank data)"
            FieldEntry fid="15" name="CURRENCY" dataType="Enum" value="0"
            FieldEntry fid="17" name="ACTIV_DATE" dataType="Date" value="(blank data)"
            FieldEntry fid="77" name="NUM_MOVES" dataType="Real" value="(blank data)"
            FieldEntry fid="239" name="REF_COUNT" dataType="UInt" value="10"
            FieldEntry fid="259" name="RECORDTYPE" dataType="UInt" value="248"
            FieldEntry fid="316" name="ROW80_2" dataType="Rmtes" value="                                                                                "
            FieldEntry fid="317" name="ROW80_3" dataType="Rmtes" value="                                                                                "
            FieldEntry fid="318" name="ROW80_4" dataType="Rmtes" value="                                                                                "
            FieldEntry fid="319" name="ROW80_5" dataType="Rmtes" value="                                                                                "
            FieldEntry fid="320" name="ROW80_6" dataType="Rmtes" value="                                                                                "
            FieldEntry fid="728" name="BCAST_REF" dataType="Rmtes" value="          "
            FieldEntry fid="800" name="LONGLINK1" dataType="Ascii" value="INUSNDS1Y="
            FieldEntry fid="801" name="LONGLINK2" dataType="Ascii" value="INRIRS"
            FieldEntry fid="802" name="LONGLINK3" dataType="Ascii" value="INUSNDS1Y="
            FieldEntry fid="803" name="LONGLINK4" dataType="Ascii" value="INUSNDS1Y="
            FieldEntry fid="804" name="LONGLINK5" dataType="Ascii" value="INUSNDS2Y="
            FieldEntry fid="805" name="LONGLINK6" dataType="Ascii" value="INUSNDS3Y="
            FieldEntry fid="806" name="LONGLINK7" dataType="Ascii" value="INUSNDS4Y="
            FieldEntry fid="807" name="LONGLINK8" dataType="Ascii" value="INUSNDS5Y="
            FieldEntry fid="808" name="LONGLINK9" dataType="Ascii" value="INUSNDS7Y="
            FieldEntry fid="809" name="LONGLINK10" dataType="Ascii" value="INUSNDS10Y="
            FieldEntry fid="810" name="LONGLINK11" dataType="Ascii" value="(blank data)"
            FieldEntry fid="811" name="LONGLINK12" dataType="Ascii" value="(blank data)"
            FieldEntry fid="812" name="LONGLINK13" dataType="Ascii" value="(blank data)"
            FieldEntry fid="813" name="LONGLINK14" dataType="Ascii" value="(blank data)"
            FieldEntry fid="814" name="LONGPREVLR" dataType="Ascii" value="(blank data)"
            FieldEntry fid="815" name="LONGNEXTLR" dataType="Ascii" value="(blank data)"
            FieldEntry fid="831" name="CTBTR_1" dataType="Rmtes" value="(blank data)"
            FieldEntry fid="832" name="CTBTR_2" dataType="Rmtes" value="(blank data)"
            FieldEntry fid="833" name="CTBTR_3" dataType="Rmtes" value="(blank data)"
            FieldEntry fid="834" name="CTBTR_4" dataType="Rmtes" value="(blank data)"
            FieldEntry fid="835" name="CTBTR_5" dataType="Rmtes" value="(blank data)"
            FieldEntry fid="836" name="CTB_LOC1" dataType="Rmtes" value="(blank data)"
            FieldEntry fid="837" name="CTB_LOC2" dataType="Rmtes" value="(blank data)"
            FieldEntry fid="838" name="CTB_LOC3" dataType="Rmtes" value="(blank data)"
            FieldEntry fid="839" name="CTB_LOC4" dataType="Rmtes" value="(blank data)"
            FieldEntry fid="840" name="CTB_LOC5" dataType="Rmtes" value="(blank data)"
            FieldEntry fid="841" name="CTB_PAGE1" dataType="Rmtes" value="(blank data)"
            FieldEntry fid="842" name="CTB_PAGE2" dataType="Rmtes" value="(blank data)"
            FieldEntry fid="843" name="CTB_PAGE3" dataType="Rmtes" value="(blank data)"
            FieldEntry fid="844" name="CTB_PAGE4" dataType="Rmtes" value="(blank data)"
            FieldEntry fid="845" name="CTB_PAGE5" dataType="Rmtes" value="(blank data)"
            FieldEntry fid="875" name="VALUE_DT1" dataType="Date" value="(blank data)"
            FieldEntry fid="876" name="VALUE_DT2" dataType="Date" value="(blank data)"
            FieldEntry fid="877" name="VALUE_DT3" dataType="Date" value="(blank data)"
            FieldEntry fid="878" name="VALUE_DT4" dataType="Date" value="(blank data)"
            FieldEntry fid="879" name="VALUE_DT5" dataType="Date" value="(blank data)"
            FieldEntry fid="968" name="CTBTR_BKGD" dataType="Ascii" value="(blank data)"
            FieldEntry fid="995" name="GEN_TEXT16" dataType="Rmtes" value="(blank data)"
            FieldEntry fid="1010" name="VALUE_TS1" dataType="Time" value="(blank data)"
            FieldEntry fid="1011" name="VALUE_TS2" dataType="Time" value="(blank data)"
            FieldEntry fid="1012" name="VALUE_TS3" dataType="Time" value="(blank data)"
            FieldEntry fid="1013" name="VALUE_TS4" dataType="Time" value="(blank data)"
            FieldEntry fid="1014" name="VALUE_TS5" dataType="Time" value="(blank data)"
            FieldEntry fid="1052" name="GN_TXT16_2" dataType="Rmtes" value="(blank data)"
            FieldEntry fid="1080" name="PREF_DISP" dataType="UInt" value="1028"
            FieldEntry fid="1081" name="PREF_LINK" dataType="Ascii" value="(blank data)"
            FieldEntry fid="1275" name="GN_TXT32_1" dataType="Rmtes" value="(blank data)"
            FieldEntry fid="1276" name="GN_TXT32_2" dataType="Rmtes" value="(blank data)"
            FieldEntry fid="1352" name="DSPLY_NMLL" dataType="Rmtes" value="                                "
            FieldEntry fid="1487" name="SEG_FORW17" dataType="Ascii" value="(blank data)"
            FieldEntry fid="1488" name="SEG_BACK17" dataType="Ascii" value="(blank data)"
            FieldEntry fid="1709" name="RDN_EXCHD2" dataType="Enum" value="(blank data)"
            FieldEntry fid="2130" name="INSTU_NAME" dataType="Enum" value="0"
            FieldEntry fid="2132" name="TILE_DESC" dataType="Enum" value="0"
            FieldEntry fid="2320" name="ALIAS" dataType="Ascii" value="(blank data)"
            FieldEntry fid="3263" name="PREV_DISP" dataType="UInt" value="0"
            FieldEntry fid="3366" name="MSG_VER" dataType="Rmtes" value="    "
            FieldEntry fid="4401" name="CURVE_TYPE" dataType="Rmtes" value="                  "
            FieldEntry fid="4773" name="CRV_UNIT" dataType="Rmtes" value="            "
            FieldEntry fid="5357" name="CONTEXT_ID" dataType="Real" value="2705"
            FieldEntry fid="6401" name="DDS_DSO_ID" dataType="UInt" value="12338"
            FieldEntry fid="6480" name="SPS_SP_RIC" dataType="Ascii" value=".[SPSDC5"
            FieldEntry fid="8635" name="RCS_AS_CL2" dataType="Rmtes" value="(blank data)"
        FieldListEnd

    PayloadEnd
RefreshMsgEnd


Basically data feed can send any value in the field data, therefore, API provides a function to determine whether the value of the data is Blank(or NULL) before it calls a function like getUInt to get the value.

Our example Cons_200 will call fieldEntry.getCode() === Data::BlankEnum and print (blank data)

if ( fe.getCode() == Data::BlankEnum )
     cout << " blank" << endl;
else
{
    switch ( fe.getLoadType() )
    {
       case DataType::RealEnum :
        cout << fe.getReal().getAsDouble() << endl;
        break;
       case DataType::IntEnum :
        cout << fe.getInt() << endl;
        break;
       case DataType::UIntEnum :
        cout << fe.getUInt() << endl;
        break;
       ...
    }
}


I guess that your application does not use getCode() to check if the field value is Blank before you get the data and I would suggest you add the check to your codes to avoid the exception.

If you want to know why you get a blank value for a specific field from the feed, I would suggest you contact content support team instead.

icon clock
10 |1500

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

Upvotes
7.6k 15 6 9

@Takii

EMA will throw InvalidUsage exception when application pass invalid ReqMsg to consumer.registerClient.

You can add a try-catch block around the EMA codes and print the error message from the EMA Exception.


I believe that you are migrating from RFA Market Data interface to EMA which use OMM.

If you have a chance to use the RFA OMM interface previously, you will see that you do not need to pass 4 part subject when you set the item name.

For OMM you can just set service name and item name in the interface. And if you want a snapshot request, you just set an interestAfterRefresh flag in ReqMsg to false. Below is a sample code to send item requests with the snapshot .

consumer.registerClient( ReqMsg().serviceName( "IDN_SELECTFEED" ).name( "INUSNDS").interestAfterRefresh(false), client ); 


You can find more EMA tutorial from

https://developers.refinitiv.com/elektron/elektron-sdk-cc/learning

icon clock
10 |1500

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

Upvotes
11.5k 16 7 10

Hello @Takii

Beside the EMA C++ tutorial, you can find additional resources regarding EMA API below:

icon clock
10 |1500

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

Upvotes
3 1 1 1

Hello @moragodkrit and @WasinWaeosri

Thank you for your answers.

On application side, interestAfterRefresh flag was set to false.

The logic requesting the RIC "INUSNDS" to be aborted is as below.

Electron-SDK1.2.1.linux.rrg/Cpp-
C/Ema/Src/Access/Impl/FieldEntry.cpp
UInt64 FieldEntry::getUInt() const
else if ((*_pLoad->getCode() == Data::BlankEnum)
{
EmaString temp("Attempt to getUInt() while entry data is blank.");
throwIueException( temp );
}

An excaption is thrown and aborted. Moreover, requesting another chain RIC "INRIRS" does not seem to have passed the above 'else if' logic.

The process gets aborted trying to obatain the value of the RDNDISPLAY item provided by Reuters.
If RDNDISPLAY is not zero, does it return a value? On the other hand, if it is zero, does it throw?

In addition to setting the setting the interestAfterRefresh flag to false, do we need to catch throws on application side?

icon clock
10 |1500

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

Click below to post an Idea Post Idea