public void close() {
        producer.close();
        printJson(new ShutdownComplete());
    }
Close the producer to flush any remaining messages.
tools/src/main/java/org/apache/kafka/tools/VerifiableProducer.java