我正在使用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