Bird
0
0

Given this Kafka producer config snippet:

medium📝 Predict Output Q4 of 15
Kafka - Performance Tuning
Given this Kafka producer config snippet:
{"batch.size": 16384, "compression.type": "gzip"}

What is the expected effect on message sending?
AMessages are batched but not compressed.
BMessages are sent immediately without batching or compression.
CMessages are batched up to 16 KB and compressed with gzip before sending.
DMessages are compressed with gzip but sent one by one.
Step-by-Step Solution
Solution:
  1. Step 1: Analyze batch.size setting

    Batch size 16384 means messages are grouped up to 16 KB before sending.
  2. Step 2: Analyze compression.type setting

    Compression type gzip means batches are compressed using gzip codec before sending.
  3. Final Answer:

    Messages are batched up to 16 KB and compressed with gzip before sending. -> Option C
  4. Quick Check:

    batch.size + compression.type = batched & compressed [OK]
Quick Trick: Batch size limits batch bytes; compression.type sets codec [OK]
Common Mistakes:
  • Assuming no compression with batch.size set
  • Thinking compression disables batching
  • Confusing immediate send with batch size

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes