public boolean hasTimestamp() {
        return this.timestamp != RecordBatch.NO_TIMESTAMP;
    }
Indicates whether the record metadata includes the timestamp.
@return true if a valid timestamp exists, false otherwise.
clients/src/main/java/org/apache/kafka/clients/producer/RecordMetadata.java