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

TopologyTestDriver should offer an iterable signature of readOutput

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: streams
    • Labels:

      Description

      When using the TopologyTestDriver, one examines the output on a topic with the readOutput method. This method returns one record at a time, until no more records can be found, at which point in returns null.

      Many times, the usage pattern around readOutput will involve writing a loop to extract a number of records from the topic, building up a list of records, until it returns null.

      It would be helpful to offer an iterable signature of readOutput, which returns either an iterator or list over the records that are currently available in the topic. This would effectively remove the loop that a user needs to write for him/herself each time.

      Such a signature might look like:

      public Iterable<ProducerRecord<byte[],byte[]>> readOutput(java.lang.String topic);
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pkleindl Patrik Kleindl
                Reporter:
                mdrogalis Michael Drogalis
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: