Bird
Raised Fist0

A Kafka producer configuration includes:

medium📝 Debug Q6 of Q15
Kafka - with Java/Python
A Kafka producer configuration includes:
props.put("linger.ms", "-10");

What is the issue with this configuration?
ANo issue; negative linger.ms speeds up sending
Blinger.ms negative value means infinite wait time
Clinger.ms negative value is treated as zero silently
Dlinger.ms cannot be negative; it causes a configuration error
Step-by-Step Solution
Solution:
  1. Step 1: Check valid range for linger.ms

    linger.ms must be zero or positive; negative values are invalid.
  2. Step 2: Understand effect of invalid value

    Negative linger.ms causes configuration error and producer may fail to start.
  3. Final Answer:

    linger.ms cannot be negative; it causes a configuration error -> Option D
  4. Quick Check:

    linger.ms negative value = configuration error [OK]
Quick Trick: linger.ms must be zero or positive [OK]
Common Mistakes:
MISTAKES
  • Assuming negative linger.ms means infinite wait
  • Thinking negative values are ignored silently
  • Believing negative linger.ms improves performance

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes