The relationship between consumer channels and consumer events
We use OmmConsumer with ChannelSet. How do we know which channel the event in OmmConsumerClient::onStatusMsg belongs to, or what other ways to receive events in conjunction with the channel they belong to?
In addition, the registered OmmConsumerClient does not receive the first successful connection event. So again it is not clear through which channel the connection is established.
Best Answer
-
The only place I can see where the channel name itself is reported is in the EMA log file.
However, in terms of your question - I have yet to come across multiple instances of an ADS (or other provider application) running on the same host - with each ADS/provider accepting incoming connections on unique ports.
Does the above scenario exist in your environment? If so, you could ask your Refinitiv Account team to raise an enhancement request for the ChannelInformation to include the Channel name (or you can post this request on Github)
0
Answers
-
You can get information of connected server via the OmmConsumerEvent::getChannelInformation() on the OmmConsumerEvent passed in onStatusMsg() callback function.
void AppClient::onStatusMsg( const StatusMsg& statusMsg, const OmmConsumerEvent& ommEvent )
{
cout << ommEvent.getChannelInformation().toString() << endl;
cout << endl << "Handle: " << ommEvent.getHandle() << " Closure: " << ommEvent.getClosure() << endl;Output:
hostname: 192.168.27.46
IP address: not available for OmmConsumer connections
connected component info: ads2.6.0.L1.solaris.rrg 64-bit
channel state: active
connection type: socket
protocol type: Reuters wire format
major version: 14
minor version: 0
ping timeout: 30For the connection event, application can register for Login event to monitor connection status, and then use the getChannelInformation() method to get connection information. Please see the 330__Login__Streaming example application.
0 -
You can get the hostname of the channel you are connected on via the OmmConsumerEvent e.g.
void AppClient::onRefreshMsg( const RefreshMsg& refreshMsg, const OmmConsumerEvent& ommEvent ) { cout << ommEvent.getChannelInformation().getHostname() << endl;
The above will return the value you specified in the Channel->Host parameter in your config.
You can also be alerted to connection up/down & failover scenarios by registering interest in MMT_LOGIN related events by specifying a Client when creating your OmmConsumer e.g.
AppClient client; OmmConsumer consumer( OmmConsumerConfig().consumerName("Consumer_2").operationModel( OmmConsumerConfig::UserDispatchEnum ).username( "umer.nalla" ), client);
As you will note I have specified 'client' as the final parameter above - this is demonstrated in example Consumer 330 Login Streaming.
The above will result in you receive a Login related Refresh and Status messages - when connected or when a connection goes down and then reconnects e.g. to a different server e.g.:
When connected: Item Name: umer.nalla Service Name: <not set> Item State: Open / Ok / None / 'Login accepted by host osboxes.'
notice the item name is my username and host osboxes is the actual server name - rather than my local alias.
Connection lost: Item Name: <not set> Service Name: <not set> Item State: Open / Suspect / None / 'Channel is down.'
notice item name is not set.
Connection re-established:
Item Name: umer.nalla
Service Name: <not set>
Item State: Open / Ok / None / 'channel up'
followed by:
Item Name: umer.nalla
Service Name: <not set>
Item State: Open / Ok / None / 'Login accepted by host centos7-2.'Notice the hostname is centos7-2 - which is the 2nd server in my channel set.
0 -
Ok. But how to determine the connected channel, if multiple channels connect to different ports on the same host?
0 -
Please note that the latest version of Elektron SDK v1.5.0.L1 now includes port information in the getChannelInformation() response.
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 中文论坛