Bird
0
0

Which of the following is the correct syntax to set the buffer memory size to 32MB in Kafka producer properties file?

easy📝 Syntax Q12 of 15
Kafka - Performance Tuning
Which of the following is the correct syntax to set the buffer memory size to 32MB in Kafka producer properties file?
Abuffer.memory=33554432
Bbuffer.memory=32
Cbuffer.memory=32m
Dbuffer.memory=32MB
Step-by-Step Solution
Solution:
  1. Step 1: Understand Kafka config value units

    Kafka expects buffer.memory in bytes, not with units like MB or m.
  2. Step 2: Convert 32MB to bytes

    32MB = 32 * 1024 * 1024 = 33554432 bytes, so the value must be numeric bytes.
  3. Final Answer:

    buffer.memory=33554432 -> Option A
  4. Quick Check:

    Buffer memory uses bytes, not MB string [OK]
Quick Trick: Use bytes number, not MB string, for buffer.memory [OK]
Common Mistakes:
  • Adding MB or m suffix which Kafka does not parse
  • Using too small number without units
  • Confusing buffer.memory with batch.size units

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes