public TopicPartition topicPartition() {
            if (topicPartition == null && topic != null) {
                if (partition != RecordMetadata.UNKNOWN_PARTITION)
                    topicPartition = new TopicPartition(topic, partition);
                else if (recordPartition != null)
                    topicPartition = new TopicPartition(topic, recordPartition);
                else
                    topicPartition = new TopicPartition(topic, RecordMetadata.UNKNOWN_PARTITION);
            }
            return topicPartition;
        }
Callbacks that are called by the RecordAccumulator append functions:
 - user callback
 - interceptor callbacks
 - partition callback
clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java