MULESOFT-DEVELOPER-I practice question 30 of 30

A flow has a JMS Publish consume operation followed by a JMS Publish operation. Both of these operations have the default configurations. Which operation is asynchronous and which one is synchronous?

Full set: 235 questions
Answer options
A: Publish consume: Synchronous. Publish: Asynchronous. Correct answer
B: Publish consume: Asynchronous. Publish: Synchronous
C: Publish consume: Asynchronous. Publish: Asynchronous
D: Publish consume: Synchronous. Publish: Synchronous
Correct Answer:
A. Publish consume: Synchronous. Publish: Asynchronous.
Explanation

The JMS Publish consume operation is synchronous. It sends a message and then blocks the processing of the flow, waiting to receive a correlated reply message on a temporary queue. This request-reply pattern is inherently synchronous. Conversely, the JMS Publish operation is asynchronous by default. It sends a message to a destination in a "fire-and-forget" manner. The flow's execution continues immediately after the message is sent, without waiting for a response or acknowledgment. This behavior is characteristic of asynchronous, one-way messaging.

Why Incorrect

B. This option incorrectly reverses the behavior of the two operations. Publish consume is synchronous, and Publish is asynchronous.
C. This is incorrect because the Publish consume operation is synchronous, as it explicitly waits for a reply.
D. This is incorrect because the Publish operation is asynchronous by default, designed for non-blocking message sending.

References

1. MuleSoft Documentation, "JMS Connector 1.8 Reference", Publish consume operation. The documentation states: "This operation is synchronous and executes a request-reply message exchange."

2. MuleSoft Documentation, "JMS Connector 1.8 Reference", Publish operation. The documentation states: "This operation is asynchronous and sends a message to the destination."

Scroll to Top