Bird
0
0

You wrote this Kafka producer config:

medium📝 Debug Q14 of 15
Kafka - Producers
You wrote this Kafka producer config:
props.put("compression.type", "lz5");

What is the problem with this configuration?
Alz5 is not a supported compression type in Kafka.
BThe property name should be compressionType, not compression.type.
CThe value should be uppercase: LZ5.
DThere is no problem; this is valid.
Step-by-Step Solution
Solution:
  1. Step 1: Check the compression type value

    Kafka supports gzip, snappy, and lz4 only; lz5 is invalid.
  2. Step 2: Confirm property name correctness

    The property name compression.type is correct, so no issue there.
  3. Final Answer:

    lz5 is not a supported compression type in Kafka. -> Option A
  4. Quick Check:

    Only gzip, snappy, lz4 are valid compression types [OK]
Quick Trick: Use only gzip, snappy, or lz4 for compression.type [OK]
Common Mistakes:
  • Using unsupported compression types like lz5
  • Changing property name incorrectly
  • Assuming case sensitivity matters for compression type

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes