MCIA - Level 1 Exam QuestionsBrowse all questions from this exam

MCIA - Level 1 Exam - Question 8


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?

Show Answer
Correct Answer: C

To ensure the length and order of the list of objects in RESP match those in REQU, while maximizing message throughput, it is crucial to keep track of the list length and the indices of all objects in REQU. By doing this in the For Each scope and in all communications involving service S, and using persistent storage when creating RESP, you can maintain the original order regardless of the order in which responses are received. This approach allows parallel processing (maximizing throughput) while ensuring the final assembled list is in the correct order.

Discussion

17 comments
Sign in to comment
GrumpOption: A
Dec 25, 2021

A. Scatter-Gather processes concurrently, but not sequentially.

meet_abdelOption: D
Jan 2, 2022

persistent storage don't guarantee max throughtput, response should be D

rodriguescontOption: C
Jun 9, 2022

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

lzrvsOption: C
Dec 20, 2022

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.

majda091983Option: C
Feb 16, 2023

it is C

1MKOption: A
Jan 23, 2022

A for maintaining order

[Removed]Option: A
Jul 1, 2022

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.

AkanshaR91Option: A
Jul 23, 2022

Should be A

madgeezerOption: A
Aug 4, 2022

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

Ak_2020Option: A
Sep 27, 2022

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

majda091983Option: A
Oct 25, 2022

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

Viv2005Option: A
Nov 25, 2022

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.

majda091983
Feb 16, 2023

so keep tracking of the list length and all object indices in REQU ==> C is the answer

jmayOption: C
Dec 1, 2022

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

fudgeebarOption: A
Dec 20, 2022

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

godricravenclawOption: C
Feb 9, 2023

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.

prapasupOption: A
Oct 24, 2023

I will go with A

vikas_muleOption: C
Feb 12, 2024

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