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

Support retrieving partitions of ConsumerRecords

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 0.9.0.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      In new consumer on trunk, ConsumerRecords has method to retrieve records for given TopicPartition, but there is no method to retrieve TopicPartition's included/available in ConsumerRecords. Please have it supported.

      Method could be something like:

      /**
       * Get partitions of records returned by a {@link Consumer#poll(long)} operation
      */
      public Set<TopicPartition> partitions() {
          return Collections.unmodifiableSet(this.records.keySet());
      }
      

        Attachments

          Activity

            People

            • Assignee:
              sslavic Stevo Slavić
              Reporter:
              sslavic Stevo Slavić
              Reviewer:
              Guozhang Wang
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: