Setting Client Keepalives
The APIs have built-in keepalive mechanisms that are used to monitor the status of client connections. Keepalive messages are sent to the event broker over those connections at timed intervals (the minimum valid value is 50 milliseconds). If a response is not received after the maximum number of consecutive keepalive messages are sent, the API closes the connection. At this point, the client can be reconnected.
Using keepalive and reconnects can be useful if, for example, an application receives messages infrequently and remains idle for most of the time.
To disable the use of keepalives, set an interval value of 0.
Disabling keepalives can sometimes delay activity switches that occur when active/active redundancy is used and can cause transient service disruptions.
PubSub+ Messaging API | Use |
---|---|
Java RTO |
SessionHandle.PROPERTIES.KEEP_ALIVE_INT_MS |
C |
SOLCLIENT_SESSION_PROP_KEEP_ALIVE_INT_MS |
.NET |
SessionProperties.KeepAliveIntervalInMsecs |
JavaScript and Node.js |
solace.SessionProperties.keepAliveIntervalInMsecs |
PubSub+ Messaging API | Use |
---|---|
Java RTO |
SessionHandle.PROPERTIES.KEEP_ALIVE_LIMIT |
C |
SOLCLIENT_SESSION_PROP_KEEP_ALIVE_LIMIT |
.NET |
SessionProperties.KeepAliveIntervalsLimit |
Javascript and Node.js |
solace.SessionProperties.keepAliveIntervalsLimit |