Bird
0
0

Consider this orchestration snippet in Kafka:

medium📝 Debug Q6 of 15
Kafka - Event-Driven Architecture
Consider this orchestration snippet in Kafka:
if (event.type === 'OrderPlaced') {
  startPayment();
  startShipping();
}

What is the main issue with this approach?
AKafka does not support conditional logic in orchestrators
BThe event type 'OrderPlaced' is invalid in Kafka
CPayment and shipping are triggered simultaneously, risking incorrect order processing
DShipping should always trigger before payment
Step-by-Step Solution
Solution:
  1. Step 1: Analyze orchestration logic

    Both payment and shipping start immediately after 'OrderPlaced'.
  2. Step 2: Identify problem

    Shipping should wait for payment completion to maintain correct order.
  3. Final Answer:

    Payment and shipping are triggered simultaneously, risking incorrect order processing -> Option C
  4. Quick Check:

    Sequential dependencies must be respected in orchestration [OK]
Quick Trick: Orchestration must enforce correct sequence of actions [OK]
Common Mistakes:
  • Assuming Kafka events can't be conditional
  • Triggering dependent services simultaneously
  • Believing shipping precedes payment

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes