synchronized (consumer)
{
if (System.currentTimeMillis() - consumer.getLastPingTime() > subscription.getTimeout())
{
log.warn("shutdown REST subscription because of session timeout for: " + consumer.getId());
consumer.shutdown();
queueConsumers.remove(consumer.getId());
serviceManager.getTimeoutTask().remove(consumer.getId());
if (subscription.isDeleteWhenIdle()) deleteSubscriberQueue(consumer);
}
}