question

Upvotes
Accepted
25 0 1 5

Programmaticaly configured OmmConsumerConfig

I programmatically set up OmmConsumerConfig and try to use it to connect to the server, but get errors (System errno: (10057) - Socket is not connected):

loggerMsg
    TimeStamp: 16:36:09.056
    ClientName: ChannelCallbackClient
    Severity: Warning
    Text:    Received ChannelDownReconnecting event on channel <Channel_name (same as host:port)>
    Instance Name Consumer_1_1
    RsslReactor 0x00000000052E2F40
    RsslChannel 0x00000000052E2F40
    Error Id -1
    Internal sysError 10057
    Error Location ...\rsslReactorWorker.c:676
    Error Text <...\rsslSocketTransportImpl.c:5771> Error: 1002 ipcConnecting() client connect() failed.  System errno: (10057)
loggerMsgEnd

The remote server is available (telnet successfully connects to it). Host and port are provided through ChannelSet parameter.

I am unable to analyze the correctness of the generated data structure for OmmConsumerConfig, since the EMA C++ API does not allow that due to the limitations of the EMA containers (The EMA does not support immediately retrieving data from freshly created OMM containers or messages).

What shold i do?

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-apiOMMcontainer
icon clock
10 |1500

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

Upvotes
Accepted
25 0 1 5

And so, it was found out that the connection was not established because of not explicitly specified parameter ChannelType. For this parameter, the documentation specifies the default value of SSL_SOCKET(0). But for programmatic configuration default value is not supported.

icon clock
10 |1500

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

Upvotes
9.7k 49 38 60

Hi @dmitry.kozhevnikov,

It's difficult to troubleshoot the issues within your application without any code snippets. What I would do first is go through the EMA C++ tutorials, in particular the EMA Consumer - MarketPrice data which show basic usage of OmmConsumerConfig, i.e:


ahs.png (9.7 KiB)
icon clock
10 |1500

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

Ok, code snippet attached

I have no way to check if the generated configuration structure is correct, but in the log I found suspicious entries:

loggerMsg
TimeStamp: 11:35:23.183
ClientName: EmaConfig
Severity: Verbose
Text: could not get value for item [ConsumerGroup|ConsumerList|Consumer.OmmConsumer|ChannelSet]; will use default value if available
loggerMsgEnd

loggerMsg
TimeStamp: 11:35:23.184
ClientName: EmaConfig
Severity: Verbose
Text: could not get value for item [ChannelGroup|ChannelList|Channel.<channel_name>|ChannelType]; will use default value if available
loggerMsgEnd

loggerMsg
TimeStamp: 11:35:23.184
ClientName: EmaConfig
Severity: Verbose
Text: could not get value for item [ChannelGroup|ChannelList|Channel.<channel_name>|Host]; will use default value if available
loggerMsgEnd

.. and many more ...

all these parameters are configured in the code (see attached file)

Upvotes
9.7k 49 38 60

Hi @dmitry.kozhevnikov,

Ok, thanks for clarifying what you are doing in the code snippet. So you are programmtically configuring your application. It's unclear from your original question whether you were successfully able to connect and receive data from your ADS when you stated:

"The remote server is available (telnet successfully connects to it). Host and port are provided through ChannelSet parameter".

I suggested the EMA Consumer - MarketPrice data as a quick test to ensure you can connect using EMA and receive data. Please ensure you can.

Assuming that all goes well, I would then try the example application called: 421__MarketPrice__ProgrammaticConfig example within the Training section (400_Series) in the downloadable package. That example is performing all the configuration steps necessary to do what you need to do and should work. If you can get that going, that should hopefully guide you in understand the difference between that training example and your application.

Hope this helps.

icon clock
10 |1500

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

Click below to post an Idea Post Idea