Bird
0
0

A Kafka producer config has batch.size set to '16k' and compression.type set to 'gzip'. What is the issue?

medium📝 Debug Q6 of 15
Kafka - Performance Tuning
A Kafka producer config has batch.size set to '16k' and compression.type set to 'gzip'. What is the issue?
Abatch.size must be larger than 64 KB.
Bbatch.size value '16k' is invalid; it must be an integer in bytes.
Ccompression.type 'gzip' is not supported.
DNo issue; config is valid.
Step-by-Step Solution
Solution:
  1. Step 1: Check batch.size format

    batch.size expects an integer number of bytes, not a string with units like '16k'.
  2. Step 2: Validate compression.type

    gzip is a valid compression type supported by Kafka.
  3. Final Answer:

    batch.size value '16k' is invalid; it must be an integer in bytes. -> Option B
  4. Quick Check:

    batch.size must be integer bytes, not string with units [OK]
Quick Trick: batch.size must be integer bytes, no units allowed [OK]
Common Mistakes:
  • Using units like 'k' or 'KB' in batch.size
  • Assuming gzip is unsupported
  • Thinking batch.size must be > 64 KB

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes