Unhandled Exception: ThomsonReuters.RFA.Common.InvalidUsageException for OMMConsumer::UnregisterC...
...lient
We are facing occasional crash in process using RFA API.
and log says:
terminate called after throwing an instance of 'rfa::common::InvalidUsageExceptionImpl'
From https://community.developers.refinitiv.com/questions/25948/unhandled-exception-thomsonreutersrfacommoninvalid.html I understood the way to get extra information regarding the exception.
But I don't understand if I am using API in incorrect manner.
Here's stack trace
#0 0x00002b2458e9c387 in raise () from /lib64/libc.so.6
#1 0x00002b2458e9da78 in abort () from /lib64/libc.so.6
#2 0x00002b24586a6a95 in __gnu_cxx::__verbose_terminate_handler() () from /lib64/libstdc++.so.6
#3 0x0000000000e35420 in ft::mdutils::Log::terminate () at mdutils/src/logging/Log.cpp:186
#4 0x00002b24586a4a06 in ?? () from /lib64/libstdc++.so.6
#5 0x00002b24586a39b9 in ?? () from /lib64/libstdc++.so.6
#6 0x00002b24586a4624 in __gxx_personality_v0 () from /lib64/libstdc++.so.6
#7 0x00002b2458c5f8e3 in ?? () from /lib64/libgcc_s.so.1
#8 0x00002b2458c5fe17 in _Unwind_Resume () from /lib64/libgcc_s.so.1
#9 0x0000000000f0f9f6 in rfa::sessionLayer::OMMConsumerImpl::unregisterClient(rfa::common::Handle*, rfa::sessionLayer::OMMIntSpec const*) ()
We're using ROBUST FOUNDATION API 8.1.
//During unsubscribing for symbol. where m_pHandler is of type rfa::common::Handle*
if(m_pHandler)
{
try {
m_pOMMConsumer->unregisterClient(m_pHandler);
}
catch(...)
{
return false;
}
return true;
}
else
{
return false;
}
Questions :
Is the usage of API correct?
What are the possible scenarios that ommConsumer->unregisterClient(handler) can give InvalidUsageExceptionImpl.?
Best Answer
-
Thanks for reaching out to us.
It is mentioned in the RFA Developer Guide that there are two ways in which an event stream can be closed:
- The application closes the stream via unregisterClient() call to RFA.
- The application receives an event that closes the stream.
An application should call isEventStreamClosed() function on incoming messages to determine whether an event stream is closed.
If the event stream had already been closed by RFA (as determinable by the isEventStreamClosed() method on an event during event processing), then the application should not call unregisterClient(). The event stream is already closed and the Handle is no longer valid. This rule applies to event streams from all Message Models.
One common mistake is that the application still calls the unregisterClient() method with the closed handle.
If the application is already aware of this, please upgrade the application to use the latest version of RFA 8.2.2.L1 to avoid all known issues. However, if the problem still happens with the latest version of RFA, please contact the Refinitiv Developer Connect (RDC) support team directly via Contact Premium Support.
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
- 684 Datastream
- 1.4K DSS
- 614 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 248 ETA
- 554 WebSocket API
- 37 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
- 275 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
- 641 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
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 192 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 89 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛