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

if there is no message for poll, kafka consumer also apply memory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 2.1.1
    • None
    • consumer

    Description

      when poll message, but there is no record,but consumer will apply 1000 byte memory;

      fetched = new HashMap<>() is not good idea, it will apply memory in heap but there is no message;

      I think fetched = new HashMap<>() will appear in records exist;

       

      ```

        public Map<TopicPartition, List<ConsumerRecord<K, V>>> fetchedRecords() {

              Map<TopicPartition, List<ConsumerRecord<K, V>>> fetched = new HashMap<>();

              int recordsRemaining = maxPollRecords;

      ```

      Attachments

        Activity

          People

            Unassigned Unassigned
            linking12 linking12
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: