【发布时间】:2017-04-02 04:29:15
【问题描述】:
我使用 Camel 作为编排引擎。
clients sends HTTP request <-> CAMEL code <---- HTTP Req----- > external
server(s)
我正在使用 HTTP4 组件(使用默认设置)发出 HTTP 请求 到外部服务器。我有很多 http 后端。
现在我们对后端进行 http 调用的方式如下:-
// The producer is created during app initialisation. This is actually done
via blueprint.xml
ProducerTemplate producer = camelContext.createProducerTemplate();
// Whenever I need to make a http call I am executing the below code with
URL set as something like:- "http4://order-api:8099/orders/v1/ordersearch/"
Exchange exchange = producer.request(URL, new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
log.info("Executing the HTTP request : URL - " + URL + " Headers -
" + headers + " Body : " + body);
exchange.getIn().setHeaders(headers);
exchange.getIn().setBody(body);
}
});
我的查询是:-
-
HTTP4在默认设置中是否使用了一些 http 连接 在调用外部服务器时进行池化? - 如果是的话有没有办法可以配置连接池
blueprint.xml?
我正在使用Camel 2.16.1,应用程序部署在Karaf 3.0.5。
【问题讨论】:
标签: apache-camel