MULESOFT-INTEGRATION-ARCHITECT-I practice question 7 of 10

To implement predictive maintenance on its machinery equipment, ACME Tractors has installed thousands of IoT sensors that will send data for each…

Full set: 273 questions
To implement predictive maintenance on its machinery equipment, ACME Tractors has installed thousands of IoT sensors that will send data for each machinery asset as sequences of JMS messages, in near real-time, to a JMS queue named SENSOR_DATA on a JMS server. The Mule application contains a JMS Listener operation configured to receive incoming messages from the JMS servers SENSOR_DATA JMS queue. The Mule application persists each received JMS message, then sends a transformed version of the corresponding Mule event to the machinery equipment back-end systems. The Mule application will be deployed to a multi-node, customer-hosted Mule runtime cluster. Under normal conditions, each JMS message should be processed exactly once. How should the JMS Listener be configured to maximize performance and concurrent message processing of the JMS queue?
Answer options
A: Set numberOfConsumers = 1 Set primaryNodeOnly = false
B: Set numberOfConsumers = 1 Set primaryNodeOnly = true
C: Set numberOfConsumers to a value greater than one Set primaryNodeOnly = true
D: Set numberOfConsumers to a value greater than one Set primaryNodeOnly = false Correct answer
Correct Answer:
D. Set numberOfConsumers to a value greater than one Set primaryNodeOnly = false
Explanation

To maximize performance and concurrency in a multi-node cluster, the JMS Listener should be active on all nodes and use multiple consumers on each node. Setting primaryNodeOnly = false enables the listener on every node in the cluster. Setting numberOfConsumers to a value greater than one creates multiple concurrent message-consuming threads on each of those active nodes. Since JMS queues guarantee that a message is delivered to only one consumer, this setup achieves maximum parallel processing while maintaining the "exactly-once" processing requirement.

Why Incorrect

A: This configuration underutilizes each node by only allowing one consumer, limiting concurrency and performance. B: This is the least performant option, restricting processing to a single thread on a single node in the entire cluster. C: This configuration fails to utilize the other nodes in the cluster for message processing, limiting overall throughput.

References

1. MuleSoft Documentation, "JMS Connector - Listener". Under the "Clustering" section for the JMS Listener, it states: "If you set primaryNodeOnly to false (the default), every node in the cluster has an active message source."

2. MuleSoft Documentation, "JMS Connector - Listener". The documentation for the numberOfConsumers parameter explains it controls "The number of concurrent consumers for this listener." To maximize concurrency, this should be greater than one.

Scroll to Top