}
}
private QueueConsumer recreateTopicConsumer(String subscriptionId, boolean autoAck)
{
QueueConsumer consumer;
if (subscriptionExists(subscriptionId))
{
QueueConsumer tmp = null;
try
{
tmp = createConsumer(true, autoAck, subscriptionId, null, consumerTimeoutSeconds * 1000, false);
}
catch (HornetQException e)
{
throw new RuntimeException(e);
}
consumer = queueConsumers.putIfAbsent(subscriptionId, tmp);
if (consumer == null)
{
consumer = tmp;
serviceManager.getTimeoutTask().add(this, subscriptionId);
}
else
{
tmp.shutdown();
}
}
else
{
throw new WebApplicationException(Response.status(405)