Bird
0
0

Which of the following is the correct JSON structure for a notification event in microservices?

easy📝 Conceptual Q3 of 15
Microservices - Event-Driven Architecture
Which of the following is the correct JSON structure for a notification event in microservices?
A{"command": "SendNotification", "data": {"userId": 123}}
B{"type": "UserSignedUp", "payload": {"userId": 123}}
C{"notification": "EmailSent", "details": {"email": "user@example.com"}}
D{"eventType": "NotifyUser", "message": "Welcome!"}
Step-by-Step Solution
Solution:
  1. Step 1: Identify notification event structure

    Notification events typically include a type and a message to inform users or systems.
  2. Step 2: Compare options

    {"eventType": "NotifyUser", "message": "Welcome!"} clearly shows an eventType and message, fitting notification event style.
  3. Final Answer:

    {"eventType": "NotifyUser", "message": "Welcome!"} -> Option D
  4. Quick Check:

    Notification event = eventType + message [OK]
Quick Trick: Notification events carry messages for users or systems [OK]
Common Mistakes:
MISTAKES
  • Confusing command with notification
  • Using domain event format for notifications

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes