Bird
0
0

Given the following Kafka producer config snippet:

medium📝 Predict Output Q13 of 15
Kafka - Performance Tuning
Given the following Kafka producer config snippet:
{
  "batch.size": 16384,
  "compression.type": "snappy"
}

What is the expected effect on message sending?
AMessages are sent in batches up to 16 KB and compressed with Snappy
BMessages are sent one by one without compression
CMessages are compressed with gzip and batch size is ignored
DBatch size is 16 bytes and compression is disabled
Step-by-Step Solution
Solution:
  1. Step 1: Interpret batch.size value

    The batch size is set to 16384 bytes, which means messages will be grouped up to 16 KB before sending.
  2. Step 2: Interpret compression.type value

    The compression type is set to "snappy", so messages will be compressed using Snappy algorithm.
  3. Final Answer:

    Messages are sent in batches up to 16 KB and compressed with Snappy -> Option A
  4. Quick Check:

    batch.size=16384 + compression.type=snappy [OK]
Quick Trick: Check batch size bytes and compression.type value carefully [OK]
Common Mistakes:
  • Confusing batch size units (bytes vs KB)
  • Assuming gzip compression instead of snappy
  • Thinking batch size disables compression

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes