如何为Apache骆驼码头组件配置超时 [英] How configure timeout for apache camel jetty component

查看:151
本文介绍了如何为Apache骆驼码头组件配置超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Talend Open Studio 5.6 ESB,制作了一条Apache骆驼路线.我的路线的终点是:

I use Talend Open Studio 5.6 ESB, I make a apache camel route. The end of my route is :

.removeHeaders("CamelHttpPath")
.removeHeaders("CamelHttpUrl")
.removeHeaders("CamelServletContextPath")
.to("jetty:http://toOverRide?bridgeEndpoint=false&throwExceptionOnFailure=false&useContinuation=false&httpClient.timeout=120000&httpClient.idleTimeout=120000")

在此之前,我在码头组件中覆盖了用于调用远程服务的URL.该服务需要30秒才能回复,路由会关闭连接并发送错误503.如何增加超时时间.

Before this, I overide the url in the jetty component for call a remote service. This service takes 30 seconds to reply, the route closes the connection and send a error 503. How can I increase the timeout.

日志骆驼:

[WARN ]: org.apache.camel.component.jetty.CamelContinuationServlet - Continuation expired of exchangeId: ID-A1995-62398-1480423883621-0-1
[WARN ]: org.apache.camel.component.jetty.CamelContinuationServlet - Cannot resume expired continuation of exchangeId: ID-A1995-62398-1480423883621-0-1

响应:

HTTP/1.1 503 Service Unavailable
Cache-Control: must-revalidate,no-cache,no-store
Content-Type: text/html;charset=ISO-8859-1
Content-Length: 1325
Server: Jetty(8.y.z-SNAPSHOT)

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 503 Service Unavailable</title>
</head>
<body>
<h2>HTTP ERROR: 503</h2>
<p>Problem accessing /sync/mockTmcWithLog/utilisateurs/30000. Reason:
<pre>    Service Unavailable</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>  
</body>
</html>

推荐答案

以下是示例:

.to("jetty:http://toOverRide?continuationTimeout=900000&httpClient.timeout=900000")

这篇关于如何为Apache骆驼码头组件配置超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆