Bird
0
0

In an event-driven microservice system, if Service A publishes an event and Service B listens to it, what will happen if Service B is down when the event is published?

medium📝 Analysis Q5 of 15
Microservices - Event-Driven Architecture
In an event-driven microservice system, if Service A publishes an event and Service B listens to it, what will happen if Service B is down when the event is published?
AService A will wait until Service B is back online
BService A will retry sending the event synchronously
CService B will receive the event immediately after restart without broker support
DThe event is lost unless the message broker supports persistence
Step-by-Step Solution
Solution:
  1. Step 1: Understand event delivery guarantees

    If the message broker does not persist events, events sent while a consumer is down can be lost.
  2. Step 2: Analyze options

    Service A does not wait or retry synchronously in event-driven systems; delivery depends on broker persistence.
  3. Final Answer:

    The event is lost unless the message broker supports persistence -> Option D
  4. Quick Check:

    Event loss depends on broker persistence = B [OK]
Quick Trick: Event loss happens without broker persistence [OK]
Common Mistakes:
MISTAKES
  • Assuming synchronous wait in event-driven
  • Thinking service auto-receives missed events without broker
  • Confusing retries with synchronous calls

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes