Bird
0
0

What is the effect of setting max.in.flight.requests.per.connection to 1 when enable.idempotency is true?

medium📝 Predict Output Q5 of 15
Kafka - Producers
What is the effect of setting max.in.flight.requests.per.connection to 1 when enable.idempotency is true?
AIt causes the producer to drop messages on failure.
BIt ensures message order and prevents duplicates during retries.
CIt allows multiple messages to be sent in parallel.
DIt disables retries completely.
Step-by-Step Solution
Solution:
  1. Step 1: Understand max.in.flight.requests.per.connection

    This setting controls how many messages can be sent without waiting for acknowledgments.
  2. Step 2: Effect of setting it to 1 with idempotency

    Setting it to 1 ensures messages are sent one at a time, preserving order and avoiding duplicates during retries.
  3. Final Answer:

    It ensures message order and prevents duplicates during retries. -> Option B
  4. Quick Check:

    Max in-flight = 1 + idempotency = ordered safe sends [OK]
Quick Trick: Set max.in.flight to 1 for ordered idempotent sends [OK]
Common Mistakes:
  • Thinking it disables retries
  • Assuming it allows parallel sends
  • Believing it causes message loss

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes