}
}
}
else
{
UnacknowledgedMessage msg;
msg = unacknowledgedMessageMap.remove(deliveryTag);
if (msg == null)
{
_log.info("Single ack on delivery tag " + deliveryTag + " not known for channel:" +
_channel.getChannelId());
throw new AMQException("Single ack on delivery tag " + deliveryTag + " not known for channel:" +
_channel.getChannelId());
}
if (!_browsedAcks.contains(deliveryTag))
{
if (_log.isDebugEnabled())
{
_log.debug("Discarding message: " + msg.message.getMessageId());
}
//Message has been ack so discard it. This will dequeue and decrement the reference.
msg.discard(_storeContext);
}
else
{
_browsedAcks.remove(deliveryTag);
}