O'Reilly logo
  • kumarps64 thinks this is interesting:

String runtime = new Date().toString();; String msg = "Message Publishing Time - " + runtime; KeyedMessage<String, String> data = new KeyedMessage<String, String> (topic, msg); producer.send(data);

From

Cover of Learning Apache Kafka - Second Edition

Note

public