Set a http socket timeout correctly in camel 3

879 Views Asked by At

Having this Spring-XML config

<to uri="http://localhost:8088/?httpMethod=GET&amp;bridgeEndpoint=true&amp;socketTimeout=10000&amp;throwExceptionOnFailure=false"/>

I've got a socketTimeout is a custom option that is not part of the Camel component warning in IntelliJ IDEA.
Indeed, in camel-docs I see socketTimeout in Component Options and other options from the snippet above are in Query Parameters, so the question is if socketTimeout should be specified differently? What is the correct way to do it?
Thanks in advance

1

There are 1 best solutions below

0
On

It is defined as component option so it can't be used from the endpoint uri. If you are using spring, you can do something like https://camel.apache.org/manual/latest/configuring-camel.html#ConfiguringCamel-WorkingwithSpringXML to configure the timeout on the component.