private static final int COMMIT_COUNT = 1500;
public static void main(String[] args) throws IOException, InterruptedException {
final Connection connection = new ConnectionFactory().newConnection();
final Channel channel = connection.createChannel();
String queueName = channel.queueDeclare().getQueue();
execute("Transactional and Channel pooling", createChannelPoolSharingThreads(connection, queueName));
queueName = refreshQueue(channel, queueName);
execute("Transactional, new Channel per tx", createChannelCreatingThreads(connection, queueName, true));
queueName = refreshQueue(channel, queueName);
execute("Non-transactional, new Channel per tx", createChannelCreatingThreads(connection, queueName, false));