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

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

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            linking12 linking12

            Dates

              Created:
              Updated:

              Slack

                Issue deployment