Salesforce Certified MuleSoft Platform Integration Architect free question 4 / 10 · Domain 3: Designing architecture using integration paradigms
A developer configures a Mule flow whose source consumes messages straight from an Anypoint MQ message exchange. The Anypoint MQ REST API answers that the destination should be a queue. What explains the error?
- A message exchange supports consumption, but the support depends on FIFO exchanges with message groups
- A message exchange supports the Consume operation, but the app lacks the permission for it
- A message exchange supports consumption, but the queue must first be renamed to the exchange name
- A message exchange supports the Publish operation, and apps consume from the bound queue
Show the answer and explanation
Answer: D
Why this is correct
A note in the exchange page says that message exchanges support only the Publish operation and do not support the Consume operation. Anypoint MQ forwards messages published to an exchange to the bound queues that are eligible under the binding configuration, and the app consumes from the queue. If an app tries to consume from an exchange, the REST API throws the error that the destination should be a queue. The flow source therefore has to point at a bound queue.
Why the other options are wrong
"A message exchange supports the Consume operation, but the app lacks the permission for it" … The note says exchanges do not support the Consume operation at all. Permissions are not the cause.
"A message exchange supports consumption, but the support depends on FIFO exchanges with message groups" … No exchange type supports the Consume operation. Apps consume from the queues bound to the exchange.
"A message exchange supports consumption, but the queue must first be renamed to the exchange name" … The page describes no renaming. Consumers read from the bound queues, and the exchange only forwards.
Key points
Publish to the exchange, consume from the bound queue.