Bird
0
0

In a Kafka-based Saga, if the event sequence is: Step1 success event, Step2 success event, then Step3 failure event, what is the correct next step?

medium📝 Predict Output Q4 of 15
Kafka - Event-Driven Architecture
In a Kafka-based Saga, if the event sequence is: Step1 success event, Step2 success event, then Step3 failure event, what is the correct next step?
APublish a global success event despite Step3 failure
BIgnore the failure and proceed to Step4
CRetry Step3 indefinitely until success
DTrigger compensating events for Step2 and Step1 in reverse order
Step-by-Step Solution
Solution:
  1. Step 1: Analyze failure in Step3

    Since Step3 failed, the Saga must rollback prior successful steps.
  2. Step 2: Compensate previous steps

    Compensating events for Step2 and Step1 should be triggered in reverse order to undo their effects.
  3. Final Answer:

    Trigger compensating events for Step2 and Step1 in reverse order -> Option D
  4. Quick Check:

    Rollback previous steps on failure [OK]
Quick Trick: Rollback previous steps in reverse order on failure [OK]
Common Mistakes:
  • Ignoring failure and continuing
  • Retrying indefinitely without limit
  • Publishing success despite failure

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes