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

TopicPartition Assined twice to a consumer group for 2 consumer instances

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 0.11.0.1
    • None
    • None
    • None

    Description

      I'm using StickyAssignor for consuming more than 100 topics with certain pattern.

      There are 10 consumers with the same group id.

      I expected that topic-partition to be assigned to only one consumer instance. However some topic partitions are assigned twice in 2 different difference instance, hence the consumer group process duplicate messages.

      props.put(ConsumerConfig.PARTITION_ASSIGNMENT_STRATEGY_CONFIG, Collections.singletonList(StickyAssignor.class));
      
      KafkaConsumer<Record, Record> c = new KafkaConsumer<>(props);
      c.subscribe(Pattern.compile(TOPIC_PATTERN), new NoOpConsumerRebalanceListener());
      

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Yuancheng Yuancheng PENG
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: