RefEncoding encoding = new RefEncoding();
encoding.decode(buff);
Queue queue = queues.get(encoding.queueID);
if (queue == null)
{
log.warn("Message in prepared tx for queue " + encoding.queueID +
" which does not exist. This message will be ignored.");
}
else
{
ServerMessage message = messages.get(messageID);
if (message == null)
{
throw new IllegalStateException("Cannot find message with id " + messageID);
}
postOffice.reroute(message, queue, tx);
}
break;
}
case ACKNOWLEDGE_REF:
{
long messageID = record.id;
RefEncoding encoding = new RefEncoding();
encoding.decode(buff);
Queue queue = queues.get(encoding.queueID);
if (queue == null)
{
throw new IllegalStateException("Cannot find queue with id " + encoding.queueID);
}
MessageReference removed = queue.removeReferenceWithID(messageID);
if (removed == null)
{
log.warn("Failed to remove reference for " + messageID);
}