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?
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.
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:
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.