Bird
0
0

Which is the correct way to set gzip compression in Kafka producer configuration?

easy📝 Syntax Q12 of 15
Kafka - Producers
Which is the correct way to set gzip compression in Kafka producer configuration?
Acompression.type = 'gzip'
BcompressionType = 'gzip'
Ccompression.type = gzip
Dcompression = 'gzip'
Step-by-Step Solution
Solution:
  1. Step 1: Identify the correct property name

    The Kafka producer config uses 'compression.type' to set compression.
  2. Step 2: Check the correct value format

    The value should be a string, so 'gzip' must be in quotes.
  3. Final Answer:

    compression.type = 'gzip' -> Option A
  4. Quick Check:

    Use compression.type with string value [OK]
Quick Trick: Use compression.type with quotes around value [OK]
Common Mistakes:
  • Using wrong property name like compressionType
  • Omitting quotes around 'gzip'
  • Using compression instead of compression.type

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes