question

Upvotes
Accepted
56 1 1 5

ReactorCallbackReturnCodes.FAILURE was returned from defaultMsgCallback(). This caused the Reactor to shutdown.

Hi Team,

客户发现EED下游系统在北京时间8点42时就有如下的shutdown相关报错,并且之后再无EMA API的任何日志,也没有任何行情。

2022-03-08T08:42:24,344 ERROR 27442620 [pool-10-thread-1] ItemCallbackClient 1864 processStatusMsg - loggerMsg
ClientName: ItemCallbackClient
Severity: Error
Text: Received an item event with invalid message stream
Instance Name EmaConsumer_1
RsslReactor 1abfd1f9

loggerMsgEnd


2022-03-08T08:42:24,344 ERROR 27442620 [pool-10-thread-1] ChannelCallbackClient 514 reactorChannelEventCallback - loggerMsg
ClientName: ChannelCallbackClient
Severity: Error
Text: Received ChannelDown event on channel Channel
Instance Name EmaConsumer_1
RsslReactor @3e7b3e41
RsslChannel @4be8f61b
Error Id -1
Internal sysError 0
Error Location WlItemHandler.dispatch
Error text ReactorCallbackReturnCodes.FAILURE was returned from defaultMsgCallback(). This caused the Reactor to shutdown.
loggerMsgEnd

期间备节点(连接到EDGESHA0185)数据更新并没有异常,所以我们紧急手动切换到备源取数。

之后,我们重启报错的主节点服务后行情可以正常更新。如果路孚特EMA服务端没有异常日志,那大概率是EMA API的异常

所以我们关注的问题是:

①这个报错是什么原因导致的? 从网络侧监控日志看,当时网络并无异常
②出现问题后,EMA API看起来并没有重连,链路也一直没有恢复,是API本身没有重连机制还是有其他问题?
③观察报错的内容,这种信息并不是通过OmmConsumerClient暴露的,无法被我们的程序检测,开发层面有什么办法能够捕获这些loggerMsg或者相关事件方,便我们后续监控?

ema-apijavadisconnectionreactor
icon clock
10 |1500

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

Upvotes
Accepted
16.7k 31 9 12

Hello @gang.chen1

Could you please give us more detail about the client's environment?

  • Does the client use EMA Java or C++ edition?
  • What are versions of the EMA API, compiler, OS

The application can set the EMA API reconnection behavior via the following parameters in the EmaConfig.xml configuration file.

ReconnectAttemptLimit:

  • Type: int
  • Default: -1
  • Description: Specifies the maximum number of times the consumer and non-interactive provider attempt to reconnect to a channel when it fails. If set to -1, the consumer and non-interactive provider continually attempt to reconnect.

ReconnectMaxDelay:

  • Type: int
  • Default: 5000
  • Description: Sets the maximum amount of time the consumer and non-interactive provider wait (in milliseconds) before attempting to reconnect a failed channel. Refer also to the ReconnectMinDelay parameter.

ReconnectMinDelay:

  • Type: int
  • Default: 1000
  • Description: Specifies the minimum amount of time the consumer and non-interactive provider wait (in milliseconds) before attempting to reconnect a failed channel. This wait time increases with each connection attempt, from reconnectMinDelay to reconnectMaxDelay.

The application can try to register the Login stream to monitor the state of its connectivity to the server. The EMA API examples that demonstrate this Login stream registration are as follows:

  • EMA C++: Cons333
  • EMA Java: ex333_Login_Streaming_DomainRep


icon clock
10 |1500

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

Hi Wasin,

Sorry for select the wrong forum as i wanted to select "中文论坛". anyway, thanks for your help.

Client Huatai Security is using Elektron-SDK-1.5.0.L1.java. And his question is how to monitor the state of its connectivity to the server, and take related action then. He will do some research about EMA Java: ex333_Login_Streaming_DomainRep. Will let you know if still have other questions.


Thanks

Hello @gang.chen1

It would be nice if the client can test the RTSDK version 2.0.4.L1 which is the latest version too. The client can test it in separate Dev/Test environments.

Hi Wasin,


Client's downstream apps already go live and not very easy to upgrade. but i will ask client take a try. thanks

Upvotes
16.7k 31 9 12

Hello @gang.chen1

Is it the same issue (and API version) as this old post? If so, the RTSDK (formerly known as ESDK) version 1.5.0 L1 is quite old. Please ask the client to test with the latest RTSDK version 2.0.4.L1.

icon clock
10 |1500

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