private Properties toProperties(ConsumersConfig config) {
            Properties properties = new Properties();
            properties.putAll(config.properties);
            properties.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, config.bootstrapServer);
            properties.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class.getName());
            properties.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, ByteArrayDeserializer.class.getName());
            properties.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, OffsetResetStrategy.LATEST.toString());
            return properties;
        }
Called when a message is received.

@param topicPartition the topic partition of the received message
@param payload        the received message payload
@param sendTimeNanos  the time in nanoseconds when the message was sent
tools/src/main/java/org/apache/kafka/tools/automq/perf/ConsumerService.java