Error waiting to succeed

We have a stream where we clicked soap to send soap messages to the service provider.

We need to repeat the service call 3 times if it does not work. Thus, we used the HTTP Outbound Endpoint internally to a successful scope.

It retries as expected, but if successful, even if we get a response from the service, we will see a timeout error, as shown below.

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

Comment:

I deleted before successful completion and had the HTTP Outbound endpoint directly, in which case there is no timeout error.

Later I tried until it was successful, and did not receive an expression of confirmation to accept the answer, but the same time response.

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

Can anyone suggest how to configure it until it is successful to accept the response and throws a timeout error.

+6
source share
2 answers

ackExpression has nothing to do with "accept the answer", it is intended to generate a value that will be used as the new message payload after the thread has passed the current event to the until-successful message processor.

Try setting a response-timeout on the outgoing HTTP endpoint to see if it helps: the default timeout used in the context of the until-successful scope may be too long and this problem is causing.

+2
source

I found a solution for this.

Previously, I only had an HttpOutbound endpoint inside Until-Successful, and I ran into a Timeout problem.

Now I have included the Soap component and inside to a successful range, it works fine.

Since as long as successful ones do not allow us to have only one component inside, I have a wrapped soap component, and the HttpOutbound endpoint is a chain of processors.

  <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 to David and everyone for your answers.

+1
source

Source: https://habr.com/ru/post/957082/


All Articles