private void sendMessage() throws InterruptedException {
            ProducerRecord<byte[], byte[]> record;
            if (activePartition != -1) {
                record = new ProducerRecord<>(activeTopic, activePartition, keys.next(), values.next());
            } else {
                record = new ProducerRecord<>(activeTopic, keys.next(), values.next());
            }
            sendFuture = producer.send(record, new SendRecordsCallback(this, Time.SYSTEM.milliseconds()));
            spec.flushGenerator().ifPresent(flushGenerator -> flushGenerator.increment(producer));
            spec.throughputGenerator().throttle();
        }
This workload allows for customized and even variable configurations in terms of messages per second, message size,
batch size, key size, and even the ability to target a specific partition out of a topic.

See `ConfigurableProducerSpec` for a more detailed description.
trogdor/src/main/java/org/apache/kafka/trogdor/workload/ConfigurableProducerWorker.java