Exam MCIA - Level 1 All QuestionsBrowse all questions from this 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?

    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
GrumpOption: A

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

majda091983Option: C

it is C

lzrvsOption: 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.

rodriguescontOption: 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

meet_abdelOption: D

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

vikas_muleOption: 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

prapasupOption: A

I will go with A

godricravenclawOption: 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.

fudgeebarOption: A

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

jmayOption: 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

Viv2005Option: 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.

majda091983

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

majda091983Option: A

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

Ak_2020Option: 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

madgeezerOption: 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

AkanshaR91Option: A

Should be A

[Removed]Option: A

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.

1MKOption: A

A for maintaining order