Interface ForeachAction<K,​V>

Type Parameters:
K - key type
V - value type

public interface ForeachAction<K,​V>
The ForeachAction interface for performing an action on a key-value pair. This is a stateless record-by-record operation, i.e, apply(Object, Object) is invoked individually for each record of a stream. If stateful processing is required, consider using KStream#process(...).
See Also:
KStream.foreach(ForeachAction)
  • Method Summary

    Modifier and Type Method Description
    void apply​(K key, V value)
    Perform an action for each record of a stream.
  • Method Details

    • apply

      void apply​(K key, V value)
      Perform an action for each record of a stream.
      Parameters:
      key - the key of the record
      value - the value of the record