客户咨询:
在升级接入程序,使其支持RTO v2的程序改造中,能否请给一个完整的样例?
请包含使用 clientID 和 clientSecret 的方式。如果涉及到 EmaConfig.xml 文件,也请提供该文件的详细内容。非常感谢您的帮助!
@zhenmei
Thank you for reaching out to us.
Please refer to this EMA Java API: Real-Time Optimized Version 2 Authentication Migration Guide article.
The client can also refer to the ex113_MP_SessionMgmt example. The example uses the Consumer_4 or Consumer_5 on the EMA Configuration file. I suggest to use the Consumer_4 (EncryptedProtocolType::RSSL_SOCKET) instead of Consumer_5 (EncryptedProtocolType::RSSL_WEBSOCKET) to connect to RTO.
Hi @zhenmei
There is also the EMA Consumer – Connecting to the Real-Time Optimized with Authentication Version 2 Tutorial that might help you. The code is similar to example 113 with step-by-step explanation.
Hi, Thank you for your response!Could you kindly help to look into the client’s follow-up question?
客户回复:
在一个应用程序里面,有两个Consumer,是每一个Consumer都需要使用EmaFactory.Domain.CreateLoginReq()进行登录吗?我使用的是JAVA的ema JDK的3.9.1.1的版本
This method is used by the ex333_Login_Streaming_DomainRep example which demonstrates opening of login stream as well as its processing. Having a login stream open is useful for consumer applications willing to do Off Stream Posting and or knowing the state of its connectivity to server.
Therefore, it depends on the requirement of the application.
If the client would like to know the state of its connectivity to server, the client can refer to the ex330_Login_Streaming example instead.
Thank you for your reply, could you kindly help to look into the client’s follow-up question?
是不是可以不用EmaFactory.Domain.CreateLoginReq(),如果不用这个,如何登录?有样例吗?
Also, could you help on this error that client receive?
c.r.ema.access.OmmConsumerImpl - loggerMsg ClientName: ChannelCallbackClient Severity: Warning Text: Received ChannelDownReconnecting event on channel Channel_1 RsslReactor @72672202 RsslChannel @1db3124d Error Id 0 Internal sysError 0 Error Location Reactor.processWorkerEvent Error text Error - exceeded initialization timeout (5 s) loggerMsgEnd
Can the client run the ex113_MP_SessionMgmt example to verify the connection and RTO credentials?
Please refer to this Quick Start - Connecting to the Real-Time -- Optimized with Authetication Version 2.