0
votes

I am new to Mule ESB. Currently i am handling a project, where we are using Mule as message broker. Requirement is client will call a SOAP web service (request-response) published in Mule ESB. In the server request will be accepted and return a correlation id in the ws response to the client, but at the same time service will also put request payload in the JMS queue for async processing. The JMS queue is also maintained in the Same Mule ESB. Could you please help me how HTTP endpoint can push to JMS endpoint in Mule ESB?

1

1 Answers

0
votes

This is very simple, if you want to put your soap request in a JMS queue along the call to the SOAP web service exposed in the Mule, then what you can do is after your HTTP listener in the flow, you need to put a Async block (reference :- https://docs.mulesoft.com/mule-user-guide/v/3.6/async-scope-reference) and in that Async block you can use Object to String Transformer followed by you JMS outbound end point.
This Async block block will create a separate thread from the flow and will push your SOAP request to the JMS queue along with your SOAP web service which accept the request and return a correlation id in the ws response to the client as you reuired.

Remember anything you put inside <async/> is considered as an async block and will used as a separate thread. You need to put this after your HTTP listener in the flow as mentioned above.