powered by Jive Software

Any alternative class for KeepAliveManager(org.jivesoftware.smack.keepalive.KeepAliveManager) in smack-4.4.2

Hello everyone,

In the smack version - 4.4.2 we could not able to find “KeepAliveManager” class.

Used Smack Version Details:
old: Smack-3.3.1
Upgraded to: Smack-4.4.2


We were using Smack-3.3.1 libraries in our client for XMPP instant messaging.
We just needed to stop the default ping requests of smack since we faced some client disconnect issues.

So we used the “org.jivesoftware.smack.keepalive.KeepAliveManager” to stop the pinging and added “org.jivesoftware.smackx.ping.PingManager” class to customize the pinging.

Attaching the sample of stop pinging.

KeepAliveManager keepAliveManager = KeepAliveManager.getInstanceFor(XMPPTCPConnection.connection);

We tried upgrading our client’s smack libraries to Smack-4.4.2. We could not able to find the “KeepAliveManager” class in Smack-4.4.2. Did research about it and referred the release notes of smack but we don’t find any information about the removal of “KeepAliveManager” class. We are facing the same client disconnection issue when we try to send instant message to a bulk number of clients(more than 300 clients).

We need to stop the default pinging. Is there any other way to stop that pinging or are we doing anything wrong here.
Please let us know if there is a solution for this.

Thanks in advance!

I am not sure if I understand you correctly. My suggestion would be to fix the issue that causes client disconnects when using XMPP pings, because those took over the job of the whitespace keepalives send by KeepAliveManager (which does no longer exist in newer Smack versions).

This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.