diff --git a/docs/streams/developer-guide/processor-api.html b/docs/streams/developer-guide/processor-api.html index 8236ded5c8274..e07efb16580c6 100644 --- a/docs/streams/developer-guide/processor-api.html +++ b/docs/streams/developer-guide/processor-api.html @@ -53,6 +53,7 @@
As we have mentioned in ProcessorContext control the processing workflow, such as scheduling a punctuation function, and committing the current processed state.
This object can also be used to access the metadata related with the application like
+ applicationId, taskId,
+ and stateDir, and also record related metadata as topic,
+ partition, offset, timestamp and
+ headers.
Here is an example implementation of how to add a new header to the record:
+public void process(String key, String value) {
+
+ // add a heaeder to the elements
+ context().headers().add.("key", "key"
+ }
+ Now that a processor (WordCountProcessor) and the @@ -399,8 +416,8 @@
Now that you have fully defined your processor topology in your application, you can proceed to running the Kafka Streams application.
-