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?

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

Download Printable PDF. VALID exam to help you PASS.

10 thoughts on “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?

  1. if you look into the quote “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. If message order is important, use a FIFO queue or set Anypoint MQ Connector to the Consume operation.”

    since we don’t have any idea about which type of anypoint mq we are using. then its safer to go with OPTION C

  2. D should be the answer .

    Persistent store , Synchronous processing does not maximize throughput ( so, A,B ,C are ruled out )

  3. Option A would be valid only if Anypoint MQs is FIFO type for S service communication, which is not mentioned in the question. Standard Anypoint MQ queues do not guarantee order. So, option C looks like the only valid answer.

  4. A is correct. JMS support publish-consume synchronous pattern.
    This will guarantee the order. There is no other way we can keep the order more efficient that this.
    B & D cannot guarantee the order, so cannot be right.
    C involve custom-coding is not the best solution.

    5
    1
  5. maximizing message throughput != Persistent Object store
    Ordering != persistent OS can cause duplicate processing in CloudHub as Anypoint MQ is only for CloudHub)
    So C is ruled out
    B is rule dout since Scatter Gather does not support ObjectStore.
    But we may argue, Synchronous may not maximize throughput. A may be rules out. Not sure what the answer is.

  6. I see ‘mule app A’ and ‘Service S’ as two separate entities.. that is kind of confusing….

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.