Channel publishingChannel = publishingConnection.createChannel();
for (int i = 0; i < n; i++) {
publishingChannel.basicPublish("", q, null, "msg".getBytes());
}
wait(latch);
publishingConnection.abort();
}
private void assertConsumerCount(int exp, String q) throws IOException {
assertEquals(exp, channel.queueDeclarePassive(q).getConsumerCount());
}