", can't deliver reference " +
ref);
}
return HandleStatus.BUSY;
}
final ServerMessage message = ref.getMessage();
if (filter != null && !filter.match(message))
{
if (HornetQServerLogger.LOGGER.isTraceEnabled())
{
HornetQServerLogger.LOGGER.trace("Reference " + ref + " is a noMatch on consumer " + this);
}
return HandleStatus.NO_MATCH;
}
if (HornetQServerLogger.LOGGER.isTraceEnabled())
{
HornetQServerLogger.LOGGER.trace("Handling reference " + ref);
}
if (!browseOnly)
{
if (!preAcknowledge)
{
deliveringRefs.add(ref);
}
ref.handled();
ref.setConsumerId(this.id);
ref.incrementDeliveryCount();
// If updateDeliveries = false (set by strict-update),
// the updateDeliveryCount would still be updated after c
if (strictUpdateDeliveryCount && !ref.isPaged())
{
if (ref.getMessage().isDurable() && ref.getQueue().isDurable() &&
!ref.getQueue().isInternalQueue() &&
!ref.isPaged())
{
storageManager.updateDeliveryCount(ref);
}
}
if (preAcknowledge)
{
if (message.isLargeMessage())
{
// we must hold one reference, or the file will be deleted before it could be delivered
((LargeServerMessage)message).incrementDelayDeletionCount();
}
// With pre-ack, we ack *before* sending to the client
ref.getQueue().acknowledge(ref);
}
}
if (message.isLargeMessage() && this.supportLargeMessage)
{
largeMessageDeliverer = new LargeMessageDeliverer((LargeServerMessage) message, ref);
}
lockDelivery.readLock().lock();