{
session.writeFrame(BasicConsumeOkBody.createAMQFrame(channelId, consumerTag));
}
//now allow queue to start async processing of any backlog of messages
queue.deliverAsync();
}
catch(ConsumerTagNotUniqueException e)
{
String msg = "Non-unique consumer tag, '" + body.consumerTag + "'";
session.writeFrame(ConnectionCloseBody.createAMQFrame(channelId, AMQConstant.NOT_ALLOWED.getCode(), msg, BasicConsumeBody.CLASS_ID, BasicConsumeBody.METHOD_ID));