【发布时间】:2014-07-24 08:35:20
【问题描述】:
我需要在具有不同查询参数的特定域上执行大量 http 请求,我计划使用 spring 集成的 outbound-gateway 配置类似于下面的 sn-p:
<int-http:outbound-gateway id="httpOutboundGateway" request-channel="requestChannel"
url="http://www.google.com" http-method="GET" reply-channel="responseChannel"
expected-response-type="java.lang.String" charset="UTF-8" reply-timeout="5000"
message-converters="" >
</int-http:outbound-gateway>
我想使用一些线程池并行执行请求通道中的请求。在这种情况下,我有以下问题:
- 将请求通道配置为 ExecutorChannel 会自动并行执行请求。
- 如果问题 1 的答案是肯定的,那么它是否是 http:outbound-gateway 线程安全的。
- 如果问题1的答案是否定的,如何配置并行执行http请求
【问题讨论】:
标签: java spring spring-integration