Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam MCIA - Level 1 All Questions

View all questions & answers for the MCIA - Level 1 exam

Exam MCIA - Level 1 topic 1 question 8 discussion

Actual exam question from Mulesoft's MCIA - Level 1
Question #: 8
Topic #: 1
[All MCIA - Level 1 Questions]

Mule application A receives a request Anypoint MQ message REQU with a payload containing a variable-length list of request objects. Application A uses the For
Each scope to split the list into individual objects and sends each object as a message to an Anypoint MQ queue.
Service S listens on that queue, processes each message independently of all other messages, and sends a response message to a response queue.
Application A listens on that response queue and must in turn create and publish a response Anypoint MQ message RESP with a payload containing the list of responses sent by service S in the same order as the request objects originally sent in REQU.
Assume successful response messages are returned by service S for all request messages.
What is required so that application A can ensure that the length and order of the list of objects in RESP and REQU match, while at the same time maximizing message throughput?

  • A. Perform all communication involving service S synchronously from within the For Each scope, so objects in RESP are in the exact same order as request objects in REQU
  • B. Use a Scatter-Gather within the For Each scope to ensure response message order Configure the Scatter-Gather with a persistent object store
  • C. Keep track of the list length and all object indices in REQU, both in the For Each scope and in all communication involving service. Use persistent storage when creating RESP
  • D. Use an Async scope within the For Each scope and collect response messages in a second For Each scope in the order in which they arrive, then send RESP using this list of responses
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
vikas_mule
9 months, 2 weeks ago
Selected Answer: C
C. Keep track of the list length and all object indices in REQU, both in the For Each scope and in all communication involving service. Use persistent storage when creating RESP
upvoted 1 times
...
prapasup
1 year, 1 month ago
Selected Answer: A
I will go with A
upvoted 1 times
...
majda091983
1 year, 9 months ago
Selected Answer: C
it is C
upvoted 2 times
...
godricravenclaw
1 year, 9 months ago
Selected Answer: C
I was about to choose A but then according to MuleSoft, "Standard queues attempt to preserve the order of messages, but strict order is not guaranteed. Because standard queues are designed to be scalable and distributed, they can’t guarantee that messages are received in the same order that they are sent." It's not mentioned if it's a FIFO queue. So even though it's not mentioned in C, by keeping track of the indices, parallel processing can be achieved while keeping the sequence intact.
upvoted 1 times
...
lzrvs
1 year, 11 months ago
Selected Answer: C
In order to maximize throughput, and maintain order, the processing needs to happen with multiple consumers, which would alter the order. To restore it, keep track of indices and length of the original list and assemble the response message using persistent OSv2 entries.
upvoted 2 times
...
fudgeebar
1 year, 11 months ago
I'll go with A. By the process of elimination, B and D are obviously incorrect. Now, coming to C, it is a very tricky question but A is the more correct answer
upvoted 1 times
...
jmay
1 year, 11 months ago
Selected Answer: C
If maximizing the throughput is one of the goals, it has to be async. The order of the items can be tracked by what described in C
upvoted 1 times
...
Viv2005
2 years ago
Selected Answer: A
The options here are ambiguous but with some assumptions, I will go with A. If I design this, it will be like this - Service A will stamp the request message with some key and store it in persistent object store with metadata info like length. Then it publishes all messages in a loop with a correlation id in each message. Service S picks up and processes each message (not sure how much time it may take therefore it is better to have queues in between A & S) . After processing pushes the message with correlation id to response Q. Service A picks the message and stores the response in OS till all the resp are received based on correlation id and length. And finally, send the response and clear the OS. BTW JMS messages support correlation id in the header so no need to explicitly manage in the message body.
upvoted 1 times
majda091983
1 year, 9 months ago
so keep tracking of the list length and all object indices in REQU ==> C is the answer
upvoted 1 times
...
...
majda091983
2 years, 1 month ago
if A is the correct answer that mean call directly the service S in the for each and remove the intermediates queues between application A and service S
upvoted 1 times
...
AK2020
2 years, 1 month ago
Selected Answer: A
Should be A. Sync is the only way to achieve sequence if there are no errors involved (assumption is already called out in the question0
upvoted 1 times
...
madgeezer
2 years, 3 months ago
Selected Answer: A
A. Perform all communication involving service S synchronously from within the For Each scope, so objects in RESP are in the exact same order as request objects in REQU
upvoted 1 times
...
AkanshaR91
2 years, 4 months ago
Selected Answer: A
Should be A
upvoted 1 times
...
[Removed]
2 years, 4 months ago
ans should be A, only way to achieve this is to process sequentially, persistent doesn't guarenty sequence its only provide consistency and reliability, optioc c suggesting to store a list of object in the object store, suppose if you get millions of records then object-store going to provide a delay in processing, decrease the throughput, after getting the response you again have to sort the response ACC to the stored object which is not feasible option A would be efficient and maximize the throughput because in the question we didn't talk about reliability.
upvoted 1 times
...
rodriguescont
2 years, 5 months ago
Selected Answer: C
Store the list of objects and list length in Object Store is the best way to guarantee persistence and the order. For-Each maintains the order. In any case the process on Service S may cause change in the order of processing the messages received on Anypoint MQ and, consequently, in the order that the messages will be sent back to App A to build RESP. The only option that presents a solution to keep the order and consist the length is the option C
upvoted 2 times
...
1MK
2 years, 10 months ago
A for maintaining order
upvoted 1 times
...
meet_abdel
2 years, 10 months ago
persistent storage don't guarantee max throughtput, response should be D
upvoted 2 times
...
Grump
2 years, 11 months ago
A. Scatter-Gather processes concurrently, but not sequentially.
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...