We are in the design of an ESB project and we need to decide if a service operation need to be modelled as asynchronous request response operation (with callback) or two one way operations (one request and another response - unrelated within ESB).
Here is the scenario:
Step 1. The service consumer is sending a SOAP/JMS request asynchronously using MQ
Step 2. The ESB receives the MQ JMS message and calls the Service Provider synchronously SOAP/HTTP to submit the request
(Note: The response is not received on the same call. The Service Provider may take few minutes to hours or days to respond using another SOAP/HTTP call to ESB. The service provider persists the request in a DB during the above call and process the request later.)
Step 3. When the response is ready (its primarily a SUCCESS or FAIL response), the Service Provider calls ESB over SOAP/HTTP to respond to the request
Step 4. The ESB sends the SOAP/JMS response to the service consumer using MQ
Step 5. The Service Consumer reads the response message from MQ queue
Note: The Service Consumer uses a ID in the payload to correlate the request to a response.
The following are the queries I’ve:
1. Based on the scenario above would you model the ESB WSDL as asynchronous request response operation (with callback) or two one way operations?
2. What are the pros and cons of each approach?
3. Are there guidelines on when to use asynchronous request response operation (with callback) or two one way operations?
4. Also highlight the exception handling scenarios for these two approaches.
5. What if there is an ESB outage (stop and start) between step 2 and 3 and we choose asynchronous request response operation. What would happen to the responses after outage for requests before outage?