public int createProducers(List<Topic> topics, ProducersConfig config, ProducerCallback callback) {
        int count = 0;
        for (Topic topic : topics) {
            for (int i = 0; i < config.producersPerTopic; i++) {
                Producer producer = createProducer(topic, config, callback);
                producers.add(producer);
                count++;
            }
        }
        return count;
    }
Create producers for the given topics.
NOT thread-safe.

@param topics   topic names
@param config   producer configuration
@param callback callback to be called when a message is sent
@return number of producers created
tools/src/main/java/org/apache/kafka/tools/automq/perf/ProducerService.java