Reputation: 507
currently I am working with mule. I have 3 flow: RequestFlow
, ServiceResponse
, and SendResponse
.
On the first flow, I processed the request (transform the request parameter, write it into wmq, etc). FYI, wmq on this flow can only be used for write.
On the second flow, I read the response from server via another wmq, transform it into json, and send to VM. FYI, wmq on this flow only can be used for read.
On the third flow, I tried to send back the response to the first flow and generate a file.
To send back the response from flow 3 to flow 1, I try to use request-reply
But, unfortunately, when I tried to send a request, I found out that:
That's why, after all the process has been finished, my application will:
However, It's not what I want. The flow that I need is:
Result from this application should be:
So, how to do so? Thanks in advance.
Upvotes: 0
Views: 555
Reputation: 33413
You don't show the flow that consumes the messages sent to the sender
path by the VM outbound endpoint in request-reply
: I'm assuming it's a flow that takes care of sending the message to the server.
It seems that all you miss is an VM outbound endpoint in SendResponse
that would send the message to the response
path, onto which the VM inbound is waiting in the request-reply
.
PS. Of course, it's assumed the the server propagates the JMS correlation ID from the request message to the response message, otherwise Mule (nor any client for that matter) could ever reconnect the response to the request and the request-reply
would fail.
PPS. You don't need an all
router around the single VM outbound endpoint in request-reply
.
Upvotes: 1