if(results != 1)
{
throw new AMQStoreException("Unable to find message with id " + messageId + " on queue " + (queue instanceof AMQQueue ? ((AMQQueue)queue).getName() : "" )
+ " with id " + queue.getId());
}
if (_logger.isDebugEnabled())
{
_logger.debug("Dequeuing message " + messageId + " on queue " + (queue instanceof AMQQueue ? ((AMQQueue)queue).getName() : "" )
+ " with id " + queue.getId());
}
}
finally
{
stmt.close();
}
}
catch (SQLException e)
{
_logger.error("Failed to dequeue: " + e.getMessage(), e);
throw new AMQStoreException("Error deleting enqueued message with id " + messageId + " for queue " + (queue instanceof AMQQueue ? ((AMQQueue)queue).getName() : "" )
+ " with id " + queue.getId() + " from database", e);
}
}