MuleSoft Certified Integration Architect – Level 1 — Question 20
What is a recommended practice when designing an integration Mule 4 application that reads a large XML payload as a stream?
Answer options
- A. The payload must be cached using a Cache scope if it is to be sent to multiple backend systems
- B. The payload size should NOT exceed the maximum available heap memory of the Mule runtime on which the Mule application executes
- C. The payload should be dealt with as an XML stream, without converting it to a single Java object (POJO)
- D. The payload should be dealt with as a repeatable XML stream, which must only be traversed (iterated-over) once and CANNOT be accessed randomly from DataWeave expressions and scripts
Correct answer: C
Explanation
The correct answer is C because handling the payload as an XML stream allows for efficient processing of large data without loading it entirely into memory. Options A and B suggest practices that could lead to memory issues and are not as efficient, while D incorrectly implies a limitation on the stream's access that is not necessary when managed correctly.