You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/06/28 15:26:44 UTC

[GitHub] [kafka] bbejeck commented on a diff in pull request #12139: KAFKA-13821: Update Kafka Streams WordCount demo to new Processor API

bbejeck commented on code in PR #12139:
URL: https://github.com/apache/kafka/pull/12139#discussion_r908622484


##########
streams/examples/src/main/java/org/apache/kafka/streams/examples/wordcount/WordCountTransformerDemo.java:
##########
@@ -80,17 +83,17 @@ public void init(final ProcessorContext context) {
                                 final KeyValue<String, Integer> entry = iter.next();
 
                                 System.out.println("[" + entry.key + ", " + entry.value + "]");
-
-                                context.forward(entry.key, entry.value.toString());
+                                final Record<String, String> record = new Record<>(entry.key, entry.value.toString(), timestamp);

Review Comment:
   nit: we could just inline the `new Record(...)` in the `context.forward()`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org