【问题标题】:Set a http socket timeout correctly in camel 3在骆驼3中正确设置http套接字超时
【发布时间】:2023-04-06 08:41:02
【问题描述】:

拥有这个 Spring-XML 配置

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

我在 IntelliJ IDEA 中收到了 socketTimeout is a custom option that is not part of the Camel component 警告。
实际上,在camel-docs 中,我在组件选项中看到socketTimeout,上面sn-p 中的其他选项在查询参数中,所以问题是是否应该以不同方式指定socketTimeout?正确的做法是什么?
提前致谢

【问题讨论】:

    标签: spring-boot http apache-camel apache-camel-3


    【解决方案1】:

    它被定义为组件选项,因此不能从端点 uri 使用。如果你使用的是spring,你可以通过https://camel.apache.org/manual/latest/configuring-camel.html#ConfiguringCamel-WorkingwithSpringXML来配置组件的超时时间。

    【讨论】:

      猜你喜欢
      • 2016-10-18
      • 1970-01-01
      • 1970-01-01
      • 2015-07-07
      • 2020-08-30
      • 2017-03-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多