hi
i have a question about multiple http outbound connection.
in my use case i need to download files via http, i'm using this:
this works fine (but if you have better option, i'd be happy to knowPHP Code:<int:channel id="fileList"></int:channel>
<int-http:outbound-gateway id="httpOutboundGateway"
url="{outboundGatewayUrl}" request-channel="fileList"
reply-channel="channel13" http-method="GET"
expected-response-type="byte[]" charset="UTF-8">
<int-http:uri-variable name="outboundGatewayUrl" expression="payload" />
</int-http:outbound-gateway>
<int:channel id="channel13"></int:channel>
<int-file:outbound-channel-adapter id="dwonloadChannel" channel="channel13"
directory-expression="'${fileToProcess.dir}'"
filename-generator-expression="'file-'.concat(headers['jms_timestamp']).concat('.ready')"
auto-create-directory="true" />
)
Note-the fileList is populated with msg' by a splitter, which may produce 10-60 links at once.
My question is about, making this a multi-threaded process. meaning that i want to download ~5 files simultaneously.
will it be enough to change the channel Q
and this?PHP Code:<int:channel id="fileList"> <int:queue capacity="5"/></int:channel>
or do i need to use custom task-execution (an example would be very helpful)?PHP Code:<int:channel id="channel13"> <int:queue capacity="5"/></int:channel>
thanks!


)
Reply With Quote