Salesforce Certified MuleSoft Developer II — Question 3
An order processing system is composed of multiple Mule applications responsible for warehouse, sales, and shipping. Each application communicates using Anypoint MQ. Each message must be correlated against the original order ID for observability and tracing.
How should a developer propagate the order ID as the correlation ID across each message?
Answer options
- A. Use the underlying HTTP request of Anypoint MQ to set the "X-CORRELATION-ID" header to the order ID
- B. Wrap all Anypoint MQ Publish operations within a With CorrelationID scope from the Tracing module, setting the correlation ID to the order ID
- C. Set a custom Anypoint MQ user property to propagate the order ID and set the correlation ID in the receiving applications
- D. Use the default correlation ID; Anypoint MQ will automatically propagate it
Correct answer: C
Explanation
The correct answer is C because setting a custom Anypoint MQ user property allows the order ID to be explicitly passed along with the message, ensuring accurate tracking. Option A is incorrect as the 'X-CORRELATION-ID' header is not a standard approach for Anypoint MQ. Option B suggests using a scope for correlation ID, but it does not propagate the order ID effectively. Option D is wrong because relying solely on the default correlation ID may not carry the specific order ID needed for observability.