private static void abortTransactionAndResetPosition(
        KafkaProducer<String, String> producer,
        KafkaConsumer<String, String> consumer
    ) {
        producer.abortTransaction();
        resetToLastCommittedPositions(consumer);
    }
Get the command-line argument parser.
tools/src/main/java/org/apache/kafka/tools/TransactionalMessageCopier.java