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

Clarify Usage of "batch.size" and "max.request.size" Producer Configs

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: In Progress
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • docs, producer
    • None

    Description

      The documentation around the producer configurations "batch.size" and "max.request.size", and how they relate to one another, can be confusing.

      In reality, the "max.request.size" is a hard limit on each individual record, but the documentation makes it seem this is the maximum size of a request sent to Kafka.  If there is a situation where "batch.size" is set greater than "max.request.size" (and each individual record is smaller than "max.request.size") you could end up with larger requests than expected sent to Kafka.

      There are a few things that could be considered to make this clearer:

      1. Improve the documentation to clarify the two producer configurations and how they relate to each other
      2. Provide a producer check, and possibly a warning, if "batch.size" is found to be greater than "max.request.size"
      3. The producer could take the minimum of "batch.size" or "max.request.size"

       

      Attachments

        Issue Links

          Activity

            People

              badai Badai Aqrandista
              MarkC0x Mark Cox
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: