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,
flags, producerTxSize,
rateLimit, minMsgSize, timeLimit,