@Override public void proceedDeliver(MessageReference reference) throws Exception { try { Message message = reference.getMessage(); if (server.hasBrokerMessagePlugins()) { server.callBrokerMessagePlugins(plugin -> plugin.beforeDeliver(this, reference)); } if (message.isLargeMessage() && supportLargeMessage) { if (largeMessageDeliverer == null) { // This can't really happen as handle had already crated the deliverer // instead of throwing an exception in weird cases there is no problem on just go ahead and create it // again here largeMessageDeliverer = new LargeMessageDeliverer((LargeServerMessage) message, reference); } // The deliverer was prepared during handle, as we can't have more than one pending large message // as it would return busy if there is anything pending largeMessageDeliverer.deliver(); } else { deliverStandardMessage(reference, message); } } finally { lockDelivery.readLock().unlock(); callback.afterDelivery(); if (server.hasBrokerMessagePlugins()) { server.callBrokerMessagePlugins(plugin -> plugin.afterDeliver(this, reference)); } } }