Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-4217

KStream.transform equivalent of flatMap

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0.1
    • Fix Version/s: 2.2.0
    • Component/s: streams
    • Labels:

      Description

      KStream.transform gives you access to state stores while allowing you to return zero or one transformed KeyValue. Alas, it is unclear what method you should use if you want to access state stores and return zero or multiple KeyValue. Presumably you can use transform, always return null, and use ProcessorContext.forward to emit KeyValues.

      It may be good to introduce a transform-like flatMap equivalent, or allow store access from other KStream methods, such as flatMap itself.

      KIP: https://cwiki.apache.org/confluence/display/KAFKA/KIP-313%3A+Add+KStream.flatTransform+and+KStream.flatTransformValues

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cadonna Bruno Cadonna
                Reporter:
                elevy Elias Levy
              • Votes:
                1 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: