question

Upvotes
Accepted
185 6 12 25

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?

treprfarfa-apiopen-dacs
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.

Hi @mktdata ,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Upvote
Accepted
78.8k 250 52 74

@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.


1686110728281.png (67.2 KiB)
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.

Upvote
78.8k 250 52 74

@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.

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.

@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.
Upvotes
78.8k 250 52 74

@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


1686041565480.png (47.8 KiB)
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.

@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?


Upvotes
185 6 12 25

@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?

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
185 6 12 25

@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?"

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
78.8k 250 52 74

@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



1686102163522.png (17.3 KiB)
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
185 6 12 25

@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?

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
185 6 12 25

@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.

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.

@mktdata

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


@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)">

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"/>
Upvotes
78.8k 250 52 74

@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




1686113114632.png (15.2 KiB)
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.

@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.

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.