Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

JIRA

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyKAFKA-6454

Released: 1 2.20

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

...

Code Block
languagejava
package org.apache.kafka.stream.processor;
 
public class To {
  private To(String childName, int childIndex, long timestamp);

  public static To child(String childName);
  public static To all();
 
  public To withTimestamp(long timestamp);
}

...


Proposed Changes

We add one new overload of ProcessorContext#forward() that take one additional parameter of type To. to specify optional argument like childName or output record timestamp. If users call the new overloads and set a timestamp on the To object, the output record gets the specified timestamp assigned. For the existing methods or if no timestamp is specified on To, the default contract using the input record timestamp for the output record will be used. Note, that the new To class does not include forwarding by index anymore—we want to remove forwarding by index and only support forwarding to all or by name.

...