Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Timeout error in Until Successful

We have a flow where we have implemented a soap client to send soap messages to Service provider.

We need to retry the service call for 3 times if it fails. So we have used HTTP Outbound Endpoint inside until successful scope.

It is doing retry as expected, but in case of success scenario, even if we get the response from the service, we are observing a time out error as below.

[DispatchThread: 1] org.apache.cxf.endpoint.ClientImpl: Timed out waiting for response to operation {http://support.cxf.module.mule.org/}invoke.

Observation:

I have removed the until successfully and had the HTTP Outbound endpoint directly, in this case there is no timeout error.

I later tried having until successfully and had an acknowledge expression to accept the response, still the same time out response.

failureExpression="#[message.inboundProperties['http.status'] != 200]" ackExpression="#[message.correlationId]"

Could any one please suggest, how to configure the until successful for accepting the response and not throwing time out error.

like image 411
Kaaviraaj Avatar asked Oct 30 '13 21:10

Kaaviraaj


2 Answers

The ackExpression has nothing to do with "accept the response", it's for generating a value that will be used as the new message payload after the flow has passed the current event to the until-successful message processor.

Try setting a response-timeout on your outbound HTTP endpoint to see if it helps: maybe the default timeout used in the context of the until-successful scope is too big and creates this issue.

like image 88
David Dossot Avatar answered Dec 10 '22 20:12

David Dossot


I found a solution for this.

Earlier I had only HttpOutbound endpoint inside Until-Successful and I am facing Timeout issue.

Now I included Soap component also inside Until-successful scope it is working fine.

Since until successful allow us to have only one component inside, I have wrapped soap component and HttpOutbound endpoint iside a processor chain.

   <until-successful objectStore-ref="objectStore"
            maxRetries="3" secondsBetweenRetries="2" deadLetterQueue-ref="xxxx"
            doc:name="UntilSuccessfulService"  >                
            <processor-chain doc:name="Processor Chain">
                <cxf:jaxws-client operation="Request1" serviceClass="xxxxxxx" enableMuleSoapHeaders="true" doc:name="SOAP"/>
               <http:outbound-endpoint exchange-pattern="request-response" method="POST"  doc:name="HTTP" host="localhost" path="cService" port="xxxx" connector-ref="HTTP_HTTPS"/>                   
           </processor-chain>                
    </until-successful> 

Thanks David and all for your responses.

like image 28
Kaaviraaj Avatar answered Dec 10 '22 20:12

Kaaviraaj