How to check whether Rmtes string contains partial update
We are implementing Rmtes string partial updates in our application and facing problems with testing it on rics ICAB[1-5]. Initial data snapshot contains proper data and looks like this (e.g. from fid ROW80_5):
1 Yr -07.25/-17.25 +13.50/+07.50 +15.25/+09.25 +09.25/+03.25 -20.75/-30.75
but in refresh message we are receiving update on the same fid and string replaced with something like this
09:02 1.00020 6.0000¥¥6.50/-25.50 .25.25¥¥36.25¥¥¥20.50¥¥¥4.50¥¥¥¥¥0.75¥¥¥0.75
We are using Ema library 1.2.0 and applying updates like this
const FieldEntry& fe = fieldList.getEntry();
rmtesBuffer.apply( fe.getRmtes() );
Initially we were storing char array from obtained string with getAsUTF8().c_buf(), it had the same effect.
So we would like to check whether updated rmtes string contains proper update sequence 0x1B 0x5B <offset position> 0x60, but we were wondering what is the proper way to translate Rmtes string into hex? Also does translation of Rmtes string into EmaBuffer removes any sequences like the one showed above?
Best Answer
-
So what was found out:
- the corruption of underlying on transformation to EmaBuffer is present in 1.2.0 version of ema library, but was fixed somewhere before 1.4.0.
- transformation to EmaBuffer will return wrong data anyway, so it's not usable even in later versions
- as a solution we've decided to copy field as Data and store it as hex in EmaBuffer
const FieldEntry& fe = fl.getEntry();
const thomsonreuters::ema::access::Data& data = fe.getLoad();
const thomsonreuters::ema::access::EmaBuffer buffer = data.getAsHex();
rmtesBuffer.apply(buffer.c_buf(), buffer.length());0
Answers
-
Hello @Sergei Nazarov,
EMA would differentiate between refreshes and updates on the application's behalf, and trigger the appropriate registered callback.
I would try testing with example 310_MarketPrice_RMTES that comes with SDK.
The example is geared toward news RMTES, so in order to test with ICAB1-5, you would:
Modify on register:
UInt64 handle = consumer.registerClient( ReqMsg().serviceName( "ELEKTRON_EDGE" ).name( "ICAB1"/*"N2_UBMS"*/ ), client, closure
And modify on decode:
void AppClient::decode( const FieldList& fl )
{
while ( fl.forth("ROW80_5" /* "BCAST_TEXT"*/ ) )
{
const FieldEntry& fe = fl.getEntry();
cout << "Name: " << fe.getName() << " Value: ";
rmtesBuffer.apply( fe.getRmtes() );
cout << rmtesBuffer.toString() << endl;
}
}I am unable to test an update on this now, as the instrument is not active.
For more information, if you would like to learn more about the RMTES refresh and update, as Transport tier handles RMTES for Message tier in ETA Developer Guide, lookup section "RMTES Decoding" and "rsslHasPartialRMTESUpdate".
0 -
Hi, @""zoya.farberov! Thanks for the suggestion with 310 example. It works as expected and I've noticed what was different in our app. Since creating RmtesBuffer copy with update is restricted and throws exception, we were getting EmaBuffer(EmaBufferU16 has the same effect), but turns out that this exact action is corrupting data in RmtesBuffer and we see gibberish I've shown as example in first question in buffer. Could you please tell what is the proper way to store a copy of rmtes update? Due to our design it's not really possible to apply it immediately after obtaining.
0 -
Hi @Sergei Nazarov,
For me, the simpler approach is to copy the message, rather then the buffer, if you are on one of the later versions of EMA that supports the feature.
In Reference Guide see
:UpdateMsg::UpdateMsg ( const UpdateMsg & other )
Copy constructor.This will save you processing time in main thread callback which is very important, and potentially allow to offload heavy processing to worker threads as design choice.
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛