final ProducerRecord<String, String> record = new ProducerRecord<>(
topic, // Topic
+ partition, // Partition
key, // Key
value // Value
);
long now = System.currentTimeMillis();
log.trace(
- "{} - Queued #{} key={} latency={}ms",
+ "{} - Queued message with key={} latency={}ms",
id,
- value,
record.key(),
now - time
);