public void routingFailed( JID recipient, Packet packet )
    {
        Log.debug( "Presence sent to unreachable address: " + packet.toXML() );

        final Presence presence = (Presence) packet;

        // For a presence stanza with no 'type' attribute or a 'type' attribute
        // of "unavailable", the server MUST silently ignore the stanza.
        // (...)
        // For a presence stanza of type "subscribed", "unsubscribe", or
        // "unsubscribed", the server MUST ignore the stanza.
        if ( presence.getType() == null || Arrays.asList( Presence.Type.unavailable, Presence.Type.subscribed, Presence.Type.unsubscribe, Presence.Type.unsubscribed ).contains( presence.getType() ) ) {
            Log.trace( "Not bouncing a presence stanza of type {}", presence.getType() );
            return;
        }

        // If the presence subscription request cannot be locally delivered or
        // remotely routed (e.g., because the request is malformed, the local
        // contact does not exist, the remote server does not exist, an attempt
        // to contact the remote server times out, or any other error is
        // determined or experienced by the user's server), then the user's
        // server MUST return an appropriate error stanza to the user.
        if ( presence.getType() == Presence.Type.subscribe ) {
            Log.trace( "Bouncing a presence stanza of type {}", presence.getType() );
            bounce( presence );
        }

        bounce( presence );
    }
Notification message indicating that a packet has failed to be routed to the recipient.

@param recipient address of the entity that failed to receive the packet.
@param packet    Presence packet that failed to be sent to the recipient.
xmppserver/src/main/java/org/jivesoftware/openfire/PresenceRouter.java