EMAJ: How to keep long connection to server in OMMConsumer?

Raj.Huang
Raj.Huang Explorer

I have decoded the data from the host in Consumer. But how to keep a long connection to the host? such as heartbeat sending(I found it by using channel.ping() in ETAJ doc, but I don't konw how to do in EMAJ Consumer). Will the host send heartbeat package? if yes, how to deal with it?

Best Answer

  • Hello @Raj.Huang,

    EMA Java provides the ping management via its underlying layer (i.e. ETA Java). That's why you can't see this topic in EMA Java.

    The only option is that you can specify the ping or heartbeat value through the EMA Java's configuration parameter named 'ConnectionPingTimeout' as you can see its detail in the EMAJ_ConfigGuide.pdf document (see the excerpt below).

    image

    Anyway, there is a concern regarding ping management from ETA_DevGuide.pdf as follows:

    image

    According to the document, the server's minPingTimeout seems to have a higher priority when the application tries to negotiate the final ping value anyway.

    Hope this helps!

Answers