Timeout error in Until Successful
Asked Answered
L

2

6

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.

Loeb answered 30/10, 2013 at 21:40 Comment(1)
Please add your flow config.Karissakarita
N
2

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.

Nidus answered 30/10, 2013 at 21:49 Comment(3)
Thanks David, We have tried reducing the timeout, it is working sometimes and throwing error some times, there is no Consistent behaviour. Do we have any standard or calculation to set the response-timeout?Loeb
This is not logical, can you try adding keep-alive="false" on the HTTP outbound endpoint? Also try adding keepSendSocketOpen="false" on the HTTP connector.Nidus
I tried this, still the same response. As I mentioned, I am observing this issue, only if we have HTTP Outbound endpoint inside Untill-Successful, otherwise it is working fine. But we need until-successful as we have to do retry attempts for connection failures.Loeb
L
1

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.

Loeb answered 1/11, 2013 at 18:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.