Bird
0
0

A Kafka producer is not sending messages as expected. The config is:

medium📝 Debug Q6 of 15
Kafka - Performance Tuning
A Kafka producer is not sending messages as expected. The config is:
{"batch.size": 16384, "linger.ms": -1}

What is the issue?
A"batch.size" is too small to send messages
B"linger.ms" cannot be negative; it causes config error
CProducer requires "linger.ms" to be zero for batching
DNegative "linger.ms" means immediate send, so no issue
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: Identify effect of invalid linger.ms

    Negative linger.ms causes configuration error, preventing message sending.
  3. Final Answer:

    "linger.ms" cannot be negative; it causes config error -> Option B
  4. Quick Check:

    linger.ms negative invalid = B [OK]
Quick Trick: linger.ms must be zero or positive [OK]
Common Mistakes:
MISTAKES
  • Assuming negative linger.ms means immediate send
  • Thinking batch.size is too small
  • Confusing linger.ms zero with negative

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes