void addPacket( @Nonnull final Packet packet )
        {
            if (!packet.getFrom().getDomain().equals(domainPair.getLocal())) {
                throw new IllegalArgumentException("Cannot queue packet from sender '" + packet.getFrom() + "' in the outgoing session promise for " + domainPair + ". Local domain does not match!");
            }
            if (!packet.getTo().getDomain().equals(domainPair.getRemote())) {
                throw new IllegalArgumentException("Cannot queue packet to intended recipient '" + packet.getTo() + "' in the outgoing session promise to domain " + domainPair + ". Remote domain does not match!");
            }
            Log.trace("Queuing stanza to intended recipient '{}' in the outgoing session promise to domain '{}': {}", packet.getTo(), domainPair, packet.toXML());

            // When queuing for async processing, ensure that the queued stanza is not modified by reference, by queuing
            // a defensive copy rather than the original. Modifications of the original can be expected in broadcast-like
            // scenarios (eg: MUC) where the same stanza is re-addressed for each intended recipient. See OF-2344.
            if (!packetQueue.offer(packet.createCopy()))
            {
                Log.debug("Error sending packet in the outgoing session promise for {}. (outbound queue full): {}", domainPair, packet);
                returnErrorToSender(packet);
            }
        }
Processes stanzas that could not be delivered to a remote domain, by generating error responses where
appropriate.

@param packet The stanza that could not be delivered.
xmppserver/src/main/java/org/jivesoftware/openfire/server/OutgoingSessionPromise.java