Hello everyone,
We have a server that accepts web socket communication in order to provide some financial data to one of our consumer applications. The server is set up correctly and it could be proven by using one of the examples of Web Socket API (see this example here: https://github.com/Refinitiv/websocket-api/blob/master/Applications/Examples/java/MarketPrice.java). Basically after adjusting properties from the "MarketPrice" program and starting it, it is able to connect to our platform and to successfully log in.
After that, I am trying to do a similar thing but with the EMA Java. I created the following EMA config.xml file:
<EmaConfig> <ConsumerGroup> <DefaultConsumer value="CONSUMER"/> <ConsumerList> <Consumer> <Name value="CONSUMER"/> <ChannelSet value="CHANNEL_1, CHANNEL_2"/> <XmlTraceToStdout value="0"/> </Consumer> </ConsumerList> </ConsumerGroup> <ChannelGroup> <ChannelList> <Channel> <Name value="CHANNEL_1"/> <ChannelType value="ChannelType::RSSL_WEBSOCKET"/> <Host value="${host1}"/> <Port value="${port}"/> </Channel> <Channel> <Name value="CHANNEL_2"/> <ChannelType value="ChannelType::RSSL_WEBSOCKET"/> <Host value="${host2}"/> <Port value="${port}"/> </Channel> </ChannelList> </ChannelGroup> </EmaConfig>
And in one of my classes I create the OmmConsumer as follows:
Client client = new Client(); // where Client implements OmmConsumerClient OmmConsumer consumer = EmaFactory.createOmmConsumer( EmaFactory.createOmmConsumerConfig() .username(${userName}) .applicationId(${defaultApplicationId}) .consumerName("CONSUMER") ); ReqMsg reqMsg = EmaFactory.createReqMsg(); consumer.registerClient(reqMsg.serviceName(${serviceName}).name("${itemName}"), client);
The server utilizes a WebSocket on the following URL: ws://${host}:${port}/WebSocket.
However, with the following configuration, I receive the following response from the platform:
13:55:58.922 [main] WARN com.refinitiv.ema.access.OmmConsumerImpl - loggerMsg ClientName: ChannelCallbackClient Severity: Warning Text: Received ChannelDownReconnecting event on channel CHANNEL_1 RsslReactor @2783717b RsslChannel @76f7d241 Error Id 0 Internal sysError 0 Error Location null Error text Invalid Message Size. Message size is: 3431677. Max Message size is: 734964. loggerMsgEnd 13:55:58.925 [main] WARN com.refinitiv.ema.access.OmmConsumerImpl - loggerMsg ClientName: LoginCallbackClient Severity: Warning Text: RDMLogin stream state was changed to suspect with status message username <not set> usernameType <not set> State: Open/Suspect/None - text: "" loggerMsgEnd
Maybe there is something missing in the configuration or there is another issue why the attempt to connect to the Refinitiv data provider via EMA Java fails?
Thank you very much for your help in advance!
Best regards,
Anton