0
我需要與不同的查詢paramerters特定的域執行了大量的HTTP請求,我打算使用Spring集成的出站網關與配置類似下面的代碼片段:執行與HTTP的出站網關並行請求
<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是否定的,如何配置並行