{
final SlowConsumerDetectionQueueConfiguration config =
q.getConfiguration().getConfiguration(SlowConsumerDetectionQueueConfiguration.class.getName());
if (checkQueueStatus(q, config))
{
final SlowConsumerPolicyPlugin policy = config.getPolicy();
if (policy == null)
{
// We would only expect to see this during shutdown
getLogger().warn("No slow consumer policy for queue " + q.getName());
}
else
{
policy.performPolicy(q);
}
}
}
catch (Exception e)