log.warn("item {} moved to the error queue", firstItem);
ReplicationQueue errorQueue = queueProvider.getQueue(agent, ERROR_QUEUE_NAME);
if (!errorQueue.add(firstItem)) {
log.error("failed to move item {} the queue {}", firstItem, errorQueue);
throw new ReplicationQueueException("could not move an item to the error queue");
}
}
log.warn("item {} dropped from the default queue", firstItem);
defaultQueue.remove(firstItem.getId());
}