class QueueMonitor {

    public void processResourcePool(String resourcePoolId) throws Throwable
    {
        DataObjectResponse<Insight> insightObjectFeed =
            insightClient.getObjects(Collections.singletonList(new ByResourcePoolId(resourcePoolId)));
        if(insightObjectFeed.isError())
        {
            logger.error("Error getting any insights by resourcePoolId: {}", resourcePoolId);
            return;
        }
        if(insightObjectFeed.getAll() == null || insightObjectFeed.getAll().size() == 0)
        {
            logger.info("No insights found for ResourcePool: {}", resourcePoolId);
            return;
        }

        for(Insight insight : insightObjectFeed.getAll())
        {
            try
            {
                InsightScheduleInfo insightScheduleInfo = retrieveInsightSchedulingInfo(resourcePoolId, insight.getId());
                processInsight(insight, insightScheduleInfo);

                // TODO: break into own method?
                insightScheduleInfo.setLastExecuted(new Date());
                insightScheduleInfoPersister.persist(insightScheduleInfo);
                logger.info("Persisted update to InsightScheduleInfo: {}", insightScheduleInfo.getId());
            }
            catch(Exception e)
            {
                logger.error("Failed to process ResourcePool: {} Insight: {}", resourcePoolId, insight.getId(), e);
            }
        }
        logger.info("Processed ResourcePool: {}", resourcePoolId);
    }

    public  QueueMonitor(
        ItemQueueFactory<ReadyAgenda> readyAgendaQueueFactory,
        ObjectPersister<ReadyAgenda> readyAgendaPersister,
        ObjectClient<Insight> insightClient,
        ObjectClient<Customer> customerClient,
        ObjectPersister<InsightScheduleInfo> insightScheduleInfoPersister);

}