channel.txSelect();
channel.exchangeDeclare(exchangeName, exchangeType);
String queueName = channel.queueDeclare("", flags.contains("persistent"), true, false, null).getQueue();
QueueingConsumer consumer = new QueueingConsumer(channel);
if (prefetchCount > 0)
channel.basicQos(prefetchCount);
channel.basicConsume(queueName, autoAck, consumer);
channel.queueBind(queueName, exchangeName, id);
Thread t = new Thread(new Consumer(consumer, id, consumerTxSize, autoAck, stats, timeLimit));
consumerThreads[i] = t;
t.start();