[
https://issues.apache.org/jira/browse/CAMEL-26523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18151573#comment-18151573
]
Claus Ibsen commented on CAMEL-26523:
-------------------------------------
Decided to ask the SDK first: filed
https://github.com/aliyun/alibabacloud-oss-java-sdk-v2/issues/148 asking that
abort() drops the connection without reading the rest of the object with the
default HttpClient 5 transport. Once a release has that, camel-alibaba-oss can
call abort() on an unread stream instead of close().
_Claude Code on behalf of davsclaus_
> camel-alibaba-oss - with includeBody=false, closing an unread object stream
> still downloads the rest of the object
> ------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-26523
> URL: https://issues.apache.org/jira/browse/CAMEL-26523
> Project: Camel
> Issue Type: Improvement
> Reporter: Andrea Cosentino
> Priority: Minor
>
> Follow-up of CAMEL-26261 ([PR
> #28952|https://github.com/apache/camel/pull/28952]), which added
> {{includeBody}} so the consumer can give the object content as a stream.
> The SDK stream (alibabacloud-oss-v2) is an {{AbortableInputStream}} over
> HttpCore's {{EofSensorInputStream}}, and {{close()}} reads the rest of the
> object so the connection can be reused. So a route that does not read the
> body, or a consumer that stops in the middle of a poll, still downloads every
> remaining object in full. With the SDK's default HttpClient 5 transport, the
> SDK's {{abort()}} does the same (a local test with a 256 MB object downloaded
> all of it for both {{close()}} and {{abort()}}); only the opt-in HttpClient 4
> transport aborts without reading. The component doc now documents this.
> Options: abort for real on HttpClient 5 by unwrapping the stream
> ({{AbortableInputStream.unwarp()}}) and calling
> {{EofSensorInputStream.abort()}}, which ties the component to the SDK's
> transport internals; or ask the SDK to make its {{Abortable}} close the
> response with {{CloseMode.IMMEDIATE}} and use {{abort()}} for unread streams
> once it does.
> _Claude Code on behalf of Andrea Cosentino (oscerd)_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)