channel.basicConsume(q, new DefaultConsumer(channel));
}
final AtomicReference<String> tagA = new AtomicReference<String>();
final AtomicReference<String> tagB = new AtomicReference<String>();
final CountDownLatch listenerLatch = new CountDownLatch(n);
((AutorecoveringConnection)connection).addConsumerRecoveryListener(new ConsumerRecoveryListener() {
@Override
public void consumerRecovered(String oldConsumerTag, String newConsumerTag) {
tagA.set(oldConsumerTag);
tagB.set(newConsumerTag);
listenerLatch.countDown();