Hello team,
I am facing an issue when connecting to RTO using EMA, below is my code:
Map elementMap = EmaFactory.createMap(); ElementList elementList = EmaFactory.createElementList(); ElementList innerElementList = EmaFactory.createElementList(); innerElementList.add(EmaFactory.createElementEntry().ascii("Channel", "Channel_1")); elementMap.add(EmaFactory.createMapEntry().keyAscii("Consumer_1", MapEntry.MapAction.ADD, innerElementList)); innerElementList.clear(); elementList.add(EmaFactory.createElementEntry().map("ConsumerList", elementMap)); elementMap.clear(); Map configDb = EmaFactory.createMap(); configDb.add(EmaFactory.createMapEntry().keyAscii("ConsumerGroup", MapEntry.MapAction.ADD, elementList)); elementList.clear(); innerElementList.add(EmaFactory.createElementEntry().ascii("ChannelType", "ChannelType::RSSL_WEBSOCKET")); // discoveryClient is of ServiceEndpointDiscoveryClient type implementing onSuccess()// This client was registered using the same clientId & secret as bellow and the endpoint // was successfully discovered innerElementList.add(EmaFactory.createElementEntry().ascii("Host", discoveryClient.getHost())); innerElementList.add(EmaFactory.createElementEntry().ascii("Port", discoveryClient.getPort())); innerElementList.add(EmaFactory.createElementEntry().intValue("EnableSessionManagement", 1)); elementMap.add(EmaFactory.createMapEntry().keyAscii("Channel_1", MapEntry.MapAction.ADD, innerElementList)); innerElementList.clear(); elementList.add(EmaFactory.createElementEntry().map("ChannelList", elementMap)); elementMap.clear(); configDb.add(EmaFactory.createMapEntry().keyAscii("ChannelGroup", MapEntry.MapAction.ADD, elementList)); elementList.clear(); try { OmmConsumerConfig subscriptionConfig = EmaFactory.createOmmConsumerConfig(); // And finally create the consummer OmmConsumer subscriptionRTOConsumer = EmaFactory.createOmmConsumer(subscriptionConfig.consumerName("Consumer_1") .clientId(XXXX) .clientSecret(XXXXXXX) .tokenServiceUrlV2("api.refinitiv.com/auth/oauth2/v2/token") .config(configDb));
On the consumer creation, I have many login retry errors like this:
2023-12-20 13:19:17:566 ERROR main access.OmmConsumerImpl:675 - loggerMsg ClientName: ChannelCallbackClient Severity: Error Text: Received ChannelDown event on channel Channel_1 Instance Name Consumer_1_1 RsslReactor @2dca0d64 RsslChannel @7b84fcf8 Error Id 0 Internal sysError 0 Error Location Reactor.processWorkerEvent Error text Error - exceeded initialization timeout (5 s)loggerMsgEnd
And the final error:
2023-12-20 13:26:17:798 ERROR main refinitiv.RefinitivRTOSource:189 - Cannot start connector for client Id [XXXXX], invalid usage: login failed (timed out after waiting 45000 milliseconds) for eu-west-1-aws-3-sm.optimized-pricing-api.refinitiv.net:443)
Any help would be appreciated,
Many thanks