Bird
0
0

Which of the following is the correct way to enable compression with gzip in Kafka producer configuration?

easy📝 Syntax Q12 of 15
Kafka - Performance Tuning
Which of the following is the correct way to enable compression with gzip in Kafka producer configuration?
A"compression": "gzip"
B"compress.type": "gzip"
C"compression.type": "gzip"
D"compressionType": "gzip"
Step-by-Step Solution
Solution:
  1. Step 1: Recall Kafka producer config keys

    The correct key for compression is compression.type.
  2. Step 2: Match correct syntax

    The value should be a string like "gzip". So the correct config is "compression.type": "gzip".
  3. Final Answer:

    "compression.type": "gzip" -> Option C
  4. Quick Check:

    compression.type = gzip [OK]
Quick Trick: Use exact key 'compression.type' to enable compression [OK]
Common Mistakes:
  • Using wrong key names like 'compression' or 'compress.type'
  • Incorrect camelCase key 'compressionType'
  • Missing quotes around 'gzip'

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes