Michael
Michael

Reputation: 35341

Mule 3: Setting a response timeout value for "http:rest-service-component"

I have a flow that uses the http:rest-service-component component. The URL that I want to call takes around a minute to return a response, but "http:rest-service-component" only waits for 10 seconds.

How do I change this timeout value? The http:rest-service-component element doesn't have any sort of timeout attribute. I also tried creating an "http:connector" and setting a timeout value there, but that didn't work. Thanks.

<flow name="theFlow">
  <inbound-endpoint ... />
  <http:rest-service-component serviceUrl="..." />
</flow>

Upvotes: 1

Views: 6193

Answers (1)

David Dossot
David Dossot

Reputation: 33413

If you're OK setting this time-out as a global value, here is how you would set it to 30 seconds:

<configuration defaultResponseTimeout="30000" />

This will affect all outbound endpoints of all transports though. If you would like to affect only this HTTP interaction, the only option I see consists in adding a responseTimeout query string parameter to the end of the serviceUrl attribute:

responseTimeout=30000

It should work but I haven't confirmed it.

Upvotes: 5

Related Questions