How to know the RIC for each Update?

Hi, Dear all:
Here, I need to know the RIC for each update message.
I had referred to asked questions. For Java edition, it was suggested to add respMsg.getAttribInfo().getName().
I tried the following code in the RFA C++ StarterConsumer example,
void StarterConsumer::processMarketPriceResponse(const rfa::sessionLayer ...)
{
string temp_str;
....
temp_str = TRRic.assign(respMsg.getAttribInfo().getName().c_str());
....
}
But I found for the first time to subscribe data, the RIC can be fetched by temp_str, but for the coming update from second time, the temp_str is always null string.
Do you know what's the reason?
Best Regards
Zheng
Best Answer
-
By default, you will get RIC name in the Refresh message only.
If you want to get RIC name in both Refresh and Update message type, you have to add below flag to item request message.
| ReqMsg::AttribInfoInUpdatesFlag<br>
0
Answers
-
Thanks for your tips.
Then, may I know more detail? How to set the interaction type of the item request message as "| ReqMsg::AttribInfoInUpdatesFlag"
0 -
There's one line code:
reqMsg.setIndicationMask(reqMsg.getIndicationMask() | rfa::message::ReqMsg::ViewFlag);
Do you mean, it should be:
reqMsg.setIndicationMask(reqMsg.getIndicationMask() | rfa::message::ReqMsg::AttribInfoInUpdatesFlag);
0 -
I tried the code:
reqMsg.setIndicationMask(reqMsg.getIndicationMask() | rfa::message::ReqMsg::AttribInfoInUpdatesFlag);
but it can't work.
0 -
Are you using StarterConsumer_BatchView?
Actually, the example already received AttribInfo in the update message. But the reason that you did not see item name in the update message because the example was designed to look up item name in item map by using the handle returned from the event instead.
There are the codes that check and print item name and service name when response type Refresh and Status only.
Please review the example codes under a method named StarterConsumer_BatchView::processMarketPriceResponse.if ((respMsg.RespType == RespMsg.RespTypeEnum.Refresh || respMsg.RespType == RespMsg.RespTypeEnum.Status) && ((respMsg.HintMask & RespMsg.HintMaskFlag.AttribInfo) != 0)
{
.... Print AttribInfo
}else
{
// Update message
}You may need to modify the codes in the method to print information from AttribInfo when receiving update message.
0 -
Yes, because of additional requirements, I referred to some code in Batch example.
Thanks for your advice, let me try and feedback to you, thanks!
0 -
Hi, Moragodkrit:
I read the code in StarterConsumer_BatchView example, and as you mentioned the "ReqMsg::AttribInfoInUpdatesFlag" should be set to make sure the RIC Name can be accessed.
If the AttribInfoInUpdatesFlag didn't set, I can do anything in the "else" part, right?
Then, it comes to the beginning, how to set it?
The ReqMsg.h has an enum IndicationMask and list parameters, such as:
enum IndicationMask
{
AttribInfoInUpdatesFlag = 0x1,
FilteredInUpdatesFlag = 0x2,
ViewFlag = 0x4,
BatchFlag = 0x8
};For example, the sendItemRequest method set the parameter as:
rfa::common::Handle* sendItemRequest(const rfa::common::RFA_String& itemName,
const rfa::common::RFA_String& serviceName,
rfa::common::UInt8 indicationMask = 0,
rfa::common::UInt8 msgModelType = rfa::rdm::MMT_MARKET_PRICE,
rfa::common::Int32 interType = rfa::message::ReqMsg::InitialImageFlag | rfa::message::ReqMsg::InterestAfterRefreshFlag);Do you think the parameter of indicationMask should be changed?
Regards
0 -
I don't understand what is the problem now?
I understand that you already modified the indication mask in reqMsg to add AttribInfoInUpdatesFlag like below codes.
reqMsg.setIndicationMask(reqMsg.getIndicationMask() | rfa::message::ReqMsg::ViewFlag | rfa::message::ReqMsg::AttribInfoInUpdatesFlag);
I recommend you to read our RFA tutorial before copying the codes in our example to use in your app so that you can understand basic usage and how to process the event in RFA. You can find more details about the API usage and its flag from RFA C++ Developer Guide and RDMUsageGuide.pdf.
0 -
My problem was how to get the RIC name for any status(Status, Refresh, Update). Because I need to pass related data to Tickerplant and let it know who's the owner of data.
With you help, I think the problem had been resolved. The key is set the "AttribInfoInUpdatesFlag" open as you mentioned. And then, in the processMarketPriceResponse method do a judgement:
if (ReqMsg::AttribInfoInUpdatesFlag)
{
const AttribInfo& atrInfo = respMsg.getAttribInfo();temp_str = TRRic.assign(atrInfo.getName().c_str());
...
}
Thanks
Zheng
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 687 Datastream
- 1.4K DSS
- 621 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 4 Trading API
- 2.9K Elektron
- 1.4K EMA
- 254 ETA
- 557 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 276 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 669 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 229 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛