Bird
0
0

When implementing a saga pattern for distributed transactions in Kafka, which approach best fits the event choreography style?

hard📝 Application Q9 of 15
Kafka - Event-Driven Architecture
When implementing a saga pattern for distributed transactions in Kafka, which approach best fits the event choreography style?
AA central orchestrator sends commands to each service to execute transaction steps sequentially
BEach service emits events and reacts to others' events to progress the transaction independently
CAll services write to a shared database to coordinate transaction state
DKafka brokers manage transaction rollback automatically without service involvement
Step-by-Step Solution
Solution:
  1. Step 1: Understand saga pattern

    Saga manages distributed transactions via compensating actions.
  2. Step 2: Identify choreography approach

    Services communicate by emitting and consuming events without central control.
  3. Final Answer:

    Each service emits events and reacts to others' events to progress the transaction independently -> Option B
  4. Quick Check:

    Choreography relies on event-driven independent service coordination [OK]
Quick Trick: Saga choreography uses event-driven independent service reactions [OK]
Common Mistakes:
MISTAKES
  • Confusing choreography with orchestration
  • Assuming shared DB coordinates saga
  • Believing Kafka brokers handle rollbacks automatically

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes