Bird
0
0

You want to implement Correlation ID tracing in a microservices system that uses asynchronous messaging (e.g., message queues). What is the best approach?

hard📝 Trade-off Q8 of 15
Microservices - Monitoring and Observability
You want to implement Correlation ID tracing in a microservices system that uses asynchronous messaging (e.g., message queues). What is the best approach?
ADo not use Correlation IDs with asynchronous messaging
BInclude the Correlation ID in the message headers and propagate it through all services
CStore Correlation IDs only in the message body, not headers
DGenerate a new Correlation ID for each message and ignore previous IDs
Step-by-Step Solution
Solution:
  1. Step 1: Understand Correlation ID propagation in async messaging

    Correlation IDs should be passed along with messages to maintain traceability.
  2. Step 2: Use message headers for metadata

    Headers are the standard place to store metadata like Correlation IDs, keeping message body clean.
  3. Final Answer:

    Include the Correlation ID in the message headers and propagate it through all services -> Option B
  4. Quick Check:

    Async tracing = Propagate ID in headers [OK]
Quick Trick: Use message headers to carry Correlation IDs in async flows [OK]
Common Mistakes:
MISTAKES
  • Generating new IDs each message breaks trace
  • Storing IDs only in body complicates parsing
  • Avoiding Correlation IDs in async systems

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes