Programmatically close any existing connection without login handle
Hi,
Does anyone knows how to programmatically logoff/close any existing connection with TREP's API? Currently, we have a license that allows us to have only one connection at a time and sometimes while coding and testing the program doesn't unregister the login client before ending.
What we came up with was to always persist the login handle as soon as we get it and in the next run if we get an access denied error, we try to unregister the last login handle that we stored. But I'm not quite sure that is going to work... So I was wondering if there's a way of killing all existing connections (using our service account) without asking support to manually close the connection.
Thanks in advance!
Diego.
Best Answer
-
Are you using RFA C++?
If the answer is yes, then what you did is correct. You have to call unregisterclient() with the login handle in order to log off.
Then again, you can also log off by clean up RFA and then re-initialize everything for your next test. But this could potentially cause a problem if you are not careful.
1
Answers
-
Thanks for the quick response Warat! I'm using RFA .net library (for c#).
By "clean up RFA" did you mean using the Cleanup method that is in the code samples? If so, I'm using that code but the problem is that when coding and testing sometimes something goes wrong and the program doesn't reach to execute the cleanup method. That's why I was wondering if there's a way to cleanup previous logins without a handle id...
0 -
Is it possible that if "Context.Uninitialize()" (part of Cleanup method) fails the logout is not completed no matter if the login handle has been successfully unregistered from the omm consumer?
0 -
No, Unregister login handle is not tied to Context Uninitialize. If you successfully unregistered login handle, then login closed message should be sent and you should be logged off from TREP.
1 -
Not quite, I mean the OMMConsumer cleanup described in Developer Guide, it is chapter 11.3 for RFA .net.
Basically, you have to:
- Deactivate Event Queue
- Destroy Event Queue
- Destroy Event Source (OMMConsumer)
- Create new Event Queue and Event Source
The point is, you don't have to uninitialize context if you still using RFA.
0
Categories
- All Categories
- 6 AHS
- 37 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
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛