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

Consumer Docs Use Wrong Method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.9.0.0
    • 0.9.0.0, 0.10.0.0
    • clients
    • None

    Description

      The KafkaConsumer docs use a non-existent method for assigning partitions (consumer.assign).

      The JavaDocs show as:
      String topic = "foo";
      TopicPartition partition0 = new TopicPartition(topic, 0);
      TopicPartition partition1 = new TopicPartition(topic, 1);
      consumer.assign(partition0);
      consumer.assign(partition1);

      Should be:
      String topic = "foo";
      TopicPartition partition0 = new TopicPartition(topic, 0);
      TopicPartition partition1 = new TopicPartition(topic, 1);
      consumer.assign(Arrays.asList(partition0));
      consumer.assign(Arrays.asList(partition1));

      Attachments

        1. docspatch.diff
          0.9 kB
          Jesse Anderson

        Activity

          People

            Unassigned Unassigned
            eljefe6aa Jesse Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: