+ @PutMapping(path = "{key}")
+ public DeferredResult<ProduceResult> message(@PathVariable String key)
+ {
+ key = key.trim();
+ final ProducerRecord<String, Object> record = new ProducerRecord<>(
+ topic, // Topic
+ key, // Key
+ new FooMessage(key, System.currentTimeMillis()) // Value
+ );
+
+ return send(record);
+ }
+