Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Elektron /
  • EMA /
avatar image
Question by dmitry.kozhevnikov · Aug 07, 2019 at 03:18 AM · elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-apic++consumereventschannel

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.

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

5 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by umer.nalla · Aug 08, 2019 at 09:29 AM

Hi @dmitry.kozhevnikov

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)

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by veerapath.rungruengrayubkul · Aug 07, 2019 at 05:30 AM

@dmitry.kozhevnikov

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: 30

For 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.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by umer.nalla · Aug 07, 2019 at 07:09 AM

Hi @dmitry.kozhevnikov,

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.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Answer by dmitry.kozhevnikov · Aug 08, 2019 at 07:48 AM

Ok. But how to determine the connected channel, if multiple channels connect to different ports on the same host?

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by umer.nalla · Apr 01, 2020 at 01:36 PM

Hi @dmitry.kozhevnikov

Please note that the latest version of Elektron SDK v1.5.0.L1 now includes port information in the getChannelInformation() response.

ETA C and EMA C++ Changelog

ETA Java and EMA Java Changelo

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
6 People are following this question.

Related Questions

How to maintain an image/cache in EMA? We are moving from RFA MarketData API to EMA.

C++ EMA Batch Request

How to resolve error: "Error: 1002 Invalid IPC Mount Opcode "

Is it possible to enable Hex tracing in EMA C++?

Value of configuration parameter "SysSendBufSize" in EmaConfig.xml differs from ChannelInformation

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges