PE codes for CBE check

Hello, we rae using RFA 8.1 C++ api's to consume Level1 and Level2 market data. We want to understand how Market Price client should fetch PE codes from REFRESH response message?

  • Option 1 --> Get it from manifest of response message(Refresh).
  • Option 2 --> Get it from FID "PERM_CODE".

Which way is correct?


The other question is our RFA client(Consumer) application is expecting permission data to be available in manifest of Refresh response message [Option1 above] but our Provider is not able to set it in manifest because their real time provider api's(possibly EMA) do not allow them to set manifest at all. What is the way out in this situation?

Best Answer

  • Jirapongse
    Answer ✓

    @mktdata

    Technically, there is no manifest in the Refresh message.

    <refreshMsg domainType="RSSL_DMT_MARKET_PRICE" streamId="4" containerType="RSSL_DT_FIELD_LIST" flags="0x1FA (RSSL_RFMF_HAS_PERM_DATA|RSSL_RFMF_HAS_MSG_KEY|RSSL_RFMF_HAS_SEQ_NUM|RSSL_RFMF_SOLICITED|RSSL_RFMF_REFRESH_COMPLETE|RSSL_RFMF_HAS_QOS|RSSL_RFMF_CLEAR_CACHE)" groupId="1" seqNum="19888" permData="0301 6462 C0" qosDynamic="0" qosRate="1" qosTimeliness="1" dataState="RSSL_DATA_OK" streamState="RSSL_STREAM_OPEN" code="RSSL_SC_NONE" text="**All is well"  dataSize="1646">
        <key  flags="0x7 (RSSL_MKF_HAS_SERVICE_ID|RSSL_MKF_HAS_NAME|RSSL_MKF_HAS_NAME_TYPE)"  serviceId="10004" name="IBM.N" nameType="1"/>
        <dataBody>
            <fieldList flags="0x9 (RSSL_FLF_HAS_FIELD_LIST_INFO|RSSL_FLF_HAS_STANDARD_DATA)" fieldListNum="79" dictionaryId="1">
                <fieldEntry fieldId="1" data="3E"/>
                <fieldEntry fieldId="2" data="40"/>

    The manifest is used by RFA to represent the following data in the refresh message.

    1686110728281.png

    If there is permission data in a Refresh message, RFA consumers will get it via the manifest.

Answers

  • @mktdata

    Thanks for reaching out to us.

    Yes, you can get a DACS lock from the permission data in the refresh message.

    <refreshMsg domainType="RSSL_DMT_MARKET_PRICE" streamId="4" containerType="RSSL_DT_FIELD_LIST" flags="0x1FA (RSSL_RFMF_HAS_PERM_DATA|RSSL_RFMF_HAS_MSG_KEY|RSSL_RFMF_HAS_SEQ_NUM|RSSL_RFMF_SOLICITED|RSSL_RFMF_REFRESH_COMPLETE|RSSL_RFMF_HAS_QOS|RSSL_RFMF_CLEAR_CACHE)" groupId="1" seqNum="19888" permData="0301 6462 C0" qosDynamic="0" qosRate="1" qosTimeliness="1" dataState="RSSL_DATA_OK" streamState="RSSL_STREAM_OPEN" code="RSSL_SC_NONE" text="**All is well"  dataSize="1646">
        <key  flags="0x7 (RSSL_MKF_HAS_SERVICE_ID|RSSL_MKF_HAS_NAME|RSSL_MKF_HAS_NAME_TYPE)"  serviceId="10004" name="IBM.N" nameType="1"/>
        <dataBody>
            <fieldList flags="0x9 (RSSL_FLF_HAS_FIELD_LIST_INFO|RSSL_FLF_HAS_STANDARD_DATA)" fieldListNum="79" dictionaryId="1">
                <fieldEntry fieldId="1" data="3E"/>
                <fieldEntry fieldId="2" data="40"/>

    Otherwise, you can create it from PE in the "PROD_PERM" field.

    EMA allows users to get and set permission data in the refresh message.

    /** Returns PermissionData.
            @throw OmmInvalidUsageException if hasPermissionData() returns false
            @return EmaBuffer containing permission data
        */
        const EmaBuffer& getPermissionData() const;
    ...
        /** Specifies PermissionData.
            @param[in] permissionData an EmaBuffer object with permission data information
            @return reference to this object
        */
        RefreshMsg& permissionData( const EmaBuffer& permissionData );

    I hope that this information is of help.

  • @Jirapongse How to get permission data from refresh message in RFA api ? Can you tell me api to get it? RFA 8.1 C++ api RespMsg object do not have any api to get Permission Data.
  • @mktdata

    For RFA, the permission data is in Manifest.

    const Manifest & rfa::message::RespMsg::getManifest() const 

    const rfa::common::Buffer & rfa::message::Manifest::getPermissionData()

    You need to check the manifest's hint mask before accessing the permission data.

    1686041565480.png

  • @Jirapongse Yes we plan to use Open DACS C++ api to do so. I understand DACMC feature of Open DACS api. It allows specifying list of ip addresses while acquiring connection to DAC Daemon. It will get locked with first IP that has DAC Daemon processes running and login will be sent to that DAC site.

    Our requirement is different. We want to connect to multiple DAC Daemon sites one by one until we find out a DAC site where given user is authorized. Consider following example -

    • Let's say we have user "PT1".
    • There are two DAC sites, "Site A" & "Site B".
    • We will acquire "Site A" connection first and try logging in "PT1" user with "Site A" but it gets logged out as "PT1" is not authorized on "Site A"
    • We then acquire "Site B" connection and try logging in "PT1" user with "Site B" and it gets logged in there.

    Is this possible?

    Also out of two DAC sites, one intend to use non standard port(other than 8211) so is it possible?


    Also can you show me sample code to generate dac locks using PROD_PERM?


  • @Jirapongse Our Provider [Publisher] is using NON RFA api's so they are not able to set Manifest. Our Consumer[client] is using RFA api's so it expects permission data to be set on Manifest. Basically its incompatibility issue between provider and consumer api's. How to handle this?


    Also can you show me sample code to generate dac locks using PROD_PERM?


  • @Jirapongse

    Our Provider [Publisher] is using NON RFA api's so they are not able to set Manifest. Our Consumer[client] is using RFA api's so it expects permission data to be set on Manifest. Basically its incompatibility issue between provider and consumer api's. How to handle this?


    Also can you show me sample code to generate dac locks using PROD_PERM?

  • @Jirapongse @umer.nalla @wasin.w @Monika.Stankovic Can someone answer below query in the context of my previous question?


    "Our Provider [Publisher] is using NON RFA api's so they are not able to set Manifest. Our Consumer[client] is using RFA api's so it expects permission data to be set on Manifest. Basically its incompatibility issue between provider and consumer api's. How to handle this?


    Also can you show me sample code to generate dac locks using PROD_PERM?"

  • @mktdata

    RFA and Real-Time APIs (EMA and ETA) can get and set permission data but RFA uses the manifest to store permission data. The permission data is in the refresh message. EMA's provider applications can set the permission data by using the following method.

      RefreshMsg& permissionData( const EmaBuffer& permissionData );

    It is not an incompatibility issue. APIs just use diffrentent terms.

    You can use OpenDACS API to generate DACS locks from PEs.

    1686102163522.png


  • @Jirapongse Consider following -

    • A provider(publisher) using EMA can publish DACS lock in Refresh message only and not in Manifest
    • A consumer using RFA api can read DACS locks only from Manifest.

    How it is supposed to handle?

  • @Jirapongse Thank you very much for your response. I know this thread is getting stretched but we are very close to understanding it.

    In our case, provider using EMA is publishing refresh message that looks similar to yours. It has permData and RSSL_RFMF_HAS_PERM_DATA flag set but when RFA consumer reads it then Manifest hint mask "PermissionDataFlag" is not set.

  • @mktdata

    You can enable tracing in RFA to verify if the retrieved refresh message contains permision data.


  • @mktdata

    I can retrieve it properly with rfa8.2.2.L1.

    The trace file contains the following refresh message.

    <refreshMsg domainType="RSSL_DMT_MARKET_PRICE" streamId="3" containerType="RSSL_DT_FIELD_LIST" flags="0x1FA (RSSL_RFMF_HAS_PERM_DATA|RSSL_RFMF_HAS_MSG_KEY|RSSL_RFMF_HAS_SEQ_NUM|RSSL_RFMF_SOLICITED|RSSL_RFMF_REFRESH_COMPLETE|RSSL_RFMF_HAS_QOS|RSSL_RFMF_CLEAR_CACHE)" groupId="1" seqNum="31598" permData="0301 0162 16C0" qosDynamic="0" qosRate="2" qosTimeliness="1" dataState="RSSL_DATA_OK" streamState="RSSL_STREAM_OPEN" code="RSSL_SC_NONE" text=""  dataSize="1643">
        <key  flags="0x7 (RSSL_MKF_HAS_SERVICE_ID|RSSL_MKF_HAS_NAME|RSSL_MKF_HAS_NAME_TYPE)"  serviceId="5001" name="/IBM.N" nameType="1"/>
        <dataBody>
            <fieldList flags="0x9 (RSSL_FLF_HAS_FIELD_LIST_INFO|RSSL_FLF_HAS_STANDARD_DATA)" fieldListNum="79" dictionaryId="1">
                <fieldEntry fieldId="1" data="1848"/>
                <fieldEntry fieldId="2" data="40"/>

    The RFA code is:

    void StarterConsumer::processMarketPriceResponse(const rfa::sessionLayer::OMMItemEvent& event, const RespMsg& respMsg)
    {
    ...


        if (respMsg.getHintMask() & RespMsg::ManifestFlag)
        {
             const Manifest& manifest = respMsg.getManifest();


             if (manifest.getHintMask() & Manifest::PermissionDataFlag) {
                 const rfa::common::Buffer permissionData = manifest.getPermissionData();


                 printf("\n\n#####Permission data size: %d\n#######\n\n", permissionData.size());


             }
        }

    The output is:

    1686113114632.png



  • @Jirapongse This is what it shows -- I think permData value of "00" is not valid.


    <refreshMsg domainType="RSSL_DMT_MARKET_PRICE" streamId="6" containerType="RSSL_DT_FIELD_LIST" flags="0x6A (RSSL_RFMF_HAS_PERM_DATA|RSSL_RFMF_HAS_MSG_KEY|RSSL_RFMF_SOLICITED|RSSL_RFMF_REFRESH_COMPLETE)" groupId="0" permData="00" dataState="RSSL_DATA_OK" streamState="RSSL_STREAM_OPEN" code="RSSL_SC_NONE" text="Refresh Completed" dataSize="515">

    <key flags="0x3 (RSSL_MKF_HAS_SERVICE_ID|RSSL_MKF_HAS_NAME)" serviceId="1" name="AFC.BK"/>

    <dataBody>

    <fieldList flags="0x8 (RSSL_FLF_HAS_STANDARD_DATA)">

  • @Jirapongse I see below error. Is it because of permData="00" is set? Stream is closed by api automatically with below error.


    EQ_APAC -

    Status :

    DataState : Suspect

    StreamState : Closed

    StatusCode : NotAuthorized

    StatusText : The supplied lock is not a DACS lock


  • It is possible because the DACS lock is invalid.
  • This is the refresh message when subscribing to the same RIC (AFC.BK).

    <refreshMsg domainType="RSSL_DMT_MARKET_PRICE" streamId="3" containerType="RSSL_DT_FIELD_LIST" flags="0x1FA (RSSL_RFMF_HAS_PERM_DATA|RSSL_RFMF_HAS_MSG_KEY|RSSL_RFMF_HAS_SEQ_NUM|RSSL_RFMF_SOLICITED|RSSL_RFMF_REFRESH_COMPLETE|RSSL_RFMF_HAS_QOS|RSSL_RFMF_CLEAR_CACHE)" groupId="2" seqNum="65344" permData="0301 0167 61C0" qosDynamic="0" qosRate="2" qosTimeliness="1" dataState="RSSL_DATA_OK" streamState="RSSL_STREAM_OPEN" code="RSSL_SC_NONE" text=""  dataSize="1235">
        <key  flags="0x7 (RSSL_MKF_HAS_SERVICE_ID|RSSL_MKF_HAS_NAME|RSSL_MKF_HAS_NAME_TYPE)"  serviceId="5001" name="AFC.BK" nameType="1"/>
        <dataBody>
            <fieldList flags="0x9 (RSSL_FLF_HAS_FIELD_LIST_INFO|RSSL_FLF_HAS_STANDARD_DATA)" fieldListNum="2" dictionaryId="1">
                <fieldEntry fieldId="1" data="1A69"/>
                <fieldEntry fieldId="2" data="8E"/>