Channel[] producerChannels = new Channel[producerCount];
for (int i = 0; i < producerCount; i++) {
System.out.println("starting producer #" + i);
Connection conn = factory.newConnection();
producerConnections[i] = conn;
Channel channel = conn.createChannel();
producerChannels[i] = channel;
if (producerTxSize > 0) channel.txSelect();
if (confirm >= 0) channel.confirmSelect();
channel.exchangeDeclare(exchangeName, exchangeType);
final Producer p = new Producer(channel, exchangeName, id,