1
votes

The request-reply scope mandates that we place a outbound endpoint in the reply section of the scope, I am wondering why is the scope designed as such ?

Why can't this detail be handled internally by Mule ?

All MP's can be placed only after the request-reply scope and so I think Mule should be able to just get the reply using any endpoint it chooses and just forward the payload to the MP after the scope.

Also note that the flow which is invoked from the request section never refers to the outbound endpoint specified in the reply section, so this detail is anyways handled by Mule, then why even ask the developers to specify an outbound ?

1

1 Answers

0
votes

The request-reply scope is a 1:1 implementation of the Request-Reply integration pattern:

Request-Reply Integration Pattern

There are advantages in using a stable (ie non dynamic, non private) channel for replies, including the capacity to trigger the reply from any point in any flow.

If you do not need this, consider using synchronous endpoints instead. For example, a synchronous JMS endpoint creates a dynamic reply channel (a reply queue) to transparently support routing responses back to the caller.