【发布时间】:2013-11-14 07:02:22
【问题描述】:
我正在使用 Camel Restlet 进行一般路由,响应时间为 300 毫秒,我可以做任何设置来减少响应时间。
我的路由配置
<route id="retriveEntry">
<from uri="restlet:/user/{cachename}/{userId}?restletMethod=GET"/>
<setHeader headerName="Content-Type">
<constant>application/xml</constant>
</setHeader>
<!-- <process ref="requestTimeProc"/> -->
<to uri="restlet:http://hostname:8180/rest/{cachename}/{userId}?restletMethod=GET"/>
<!-- <process ref="responseTimeProc"/> -->
</route>
Response time By hitting the backend URL directly is :40 ms http://hostname:8180/rest/{cachename}/{userId}
我还在骆驼日志中看到了这些警告,不知道为什么:
WARNING: Addition of the standard header "Content-Length" is not allowed. Please use the equivalent property in the Restlet API.
Nov 13, 2013 5:07:38 PM org.restlet.engine.http.header.HeaderUtils addExtensionHeaders
WARNING: Addition of the standard header "Date" is not allowed. Please use the equivalent property in the Restlet API.
Nov 13, 2013 5:07:39 PM org.restlet.engine.http.header.HeaderUtils addExtensionHeaders
WARNING: Addition of the standard header "Host" is not allowed. Please use the equivalent property in the Restlet API.
Nov 13, 2013 5:07:39 PM org.restlet.engine.http.header.HeaderUtils addExtensionHeaders
WARNING: Addition of the standard header "Connection" is not allowed. Please use the equivalent property in the Restlet API.
Nov 13, 2013 5:07:39 PM org.restlet.engine.http.header.HeaderUtils addExtensionHeaders
WARNING: Addition of the standard header "User-Agent" is not allowed. Please use the equivalent property in the Restlet API.
Nov 13, 2013 5:07:39 PM org.restlet.engine.http.header.HeaderUtils addExtensionHeaders
【问题讨论】:
标签: apache http apache-camel infinispan