Versions Compared

Key

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

...

  • KStream<KOut,VOut> KStream#process(ProcessorSupplier<K, V, KOut, VOut> processorSupplier)
  • KStream<K,VOut> KStream#processValues(ProcessorSupplier<K, V, K, VOut> processorSupplier)

Deprecated methods:

  • KStream#transform 
  • KStream#transformValues 
  • KStream#flatTransform 
  • KStream#flatTransformValues 

Proposed Changes

New Processor APIs replacing most Transformers

...

Modified method KStream#process should be compatible with previous version, that at the moment is fixed to a Void return type.

Leaving Transform APIs won't be deprecated as part of this API, but transform* operations are. This and Transform API with older ProcessorContext could be considered a driver to adopt use of oldProcessorContextshould warn users and drive adoption the methods proposed in this KIP.

...

  • Transform API is broadly adopted for custom processing. Even though most functionality is possible to implement with new Processor, this migration is not straightforward and will require reimplementing custom processors.
  • KTable#transformValues is an interesting use-case for ValueTransformerWithKey as the internal value is Change<V> — an internal type to handle record changes on KTable — not exposed as public API. An approach would be to deprecate this method in favor of .toStream().processValues().toTable().

A new KIP should be proposed to continue the deprecation of Transformer  APIs.

Rejected Alternatives

Create new Transform APIs with latest ProcessContext

...