Bird
0
0

Which of the following is the correct syntax to set the batch size to 32 KB in Kafka producer properties file?

easy📝 Syntax Q3 of 15
Kafka - Performance Tuning
Which of the following is the correct syntax to set the batch size to 32 KB in Kafka producer properties file?
Abatch.size=32k
Bbatch.size=32768
Cbatch.size=32
Dbatch.size=32KB
Step-by-Step Solution
Solution:
  1. Step 1: Understand batch.size unit

    batch.size expects an integer value in bytes, so 32 KB = 32768 bytes.
  2. Step 2: Check syntax options

    Only batch.size=32768 uses correct integer bytes format; others use invalid units or strings.
  3. Final Answer:

    batch.size=32768 -> Option B
  4. Quick Check:

    batch.size uses bytes as integer [OK]
Quick Trick: Set batch.size in bytes, not with units like KB [OK]
Common Mistakes:
MISTAKES
  • Using units like KB or k in value
  • Setting batch.size too small or too large
  • Using non-integer values

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes