powered by Jive Software

Packets delivery quality

Hi, guys

Openfire wtill contain serious bug - it looses packets!

Let’s see example. We have XMPP client on smartphone. Client goes e.g. to subway and connection is suddenly lost. Or for a minute it looses wi-fi. Anyway.

In his friend contact list he is still online. Friend sends him a message and it doesn’t reach the destination.


Let’s see the code

package org.jivesoftware.openfire.nio;

public abstract class ConnectionHandler extends IoHandlerAdapter {


public void exceptionCaught(IoSession session, Throwable cause) throws Exception {

if (cause instanceof IOException) {

// TODO Verify if there were packets pending to be sent and decide what to do with them

Log.info("ConnectionHandler reports IOException for session: " + session, cause);


Because we have TODO still here.

Sender doesn’t know, that destination client lost connection. It still tries to send the packet, but IOException happened. And message is lost! Even the packet is Message type it doesn’t go neither to offline storage or is tried to reprocess.

My question is when this TODO is going to be fixed?

One more very interesting addition.

Let’s see code further:

package org.jivesoftware.openfire.nio;

public class NIOConnection implements Connection {

public void deliver(Packet packet) throws UnauthorizedException {

if (errorDelivering) {


// Retry sending the packet again. Most probably if the packet is a

// Message it will be stored offline



Guys, who should know besides developers whether it will be delivered or not?! What does @Most probably@ mean? How much probability? 50%, 90%? Where this parameter is set ?

My question is still the same - when it will be fixed.

I want to have 100% delivery, not @Most probably@