FAQ
Hi,

I have tried to use the http component to download bigger files from a
server. Initially I thought that I would get the input stream from the
response in the body of the exchange. But as far as I can tell I'm always
getting a ByteArrayInputStream, which means the stream is somehow getting
changed. In fact, when downloading a bigger file I get an OutOfMemoryError.
Is there some way to configure the http component not to do this? Are there
any recommendations for dealing with bigger files or streaming in general?

Thanks,
Jens
--
View this message in context: http://www.nabble.com/Downloading-big-files-via-the-http-component-tp22430845p22430845.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.

Search Discussions

  • Claus Ibsen at Mar 10, 2009 at 10:04 am

    On Tue, Mar 10, 2009 at 10:39 AM, _Jens wrote:
    Hi,

    I have tried to use the http component to download bigger files from a
    server. Initially I thought that I would get the input stream from the
    response in the body of the exchange. But as far as I can tell I'm always
    getting a ByteArrayInputStream, which means the stream is somehow getting
    changed. In fact, when downloading a bigger file I get an OutOfMemoryError.
    Is there some way to configure the http component not to do this? Are there
    any recommendations for dealing with bigger files or streaming in general?
    William Jiang is working on to add a feature to store big stream into
    temporary files in Camel 2.0, so you would avoid the memory issue.

    I dont know how far he got but it should be based on existing
    code/feature in Apache CXF. What is needed is some documentation and
    how to setup and configure it.




    Thanks,
    Jens
    --
    View this message in context: http://www.nabble.com/Downloading-big-files-via-the-http-component-tp22430845p22430845.html
    Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.


    --
    Claus Ibsen
    Apache Camel Committer

    Open Source Integration: http://fusesource.com
    Blog: http://davsclaus.blogspot.com/
  • Willem Jiang at Mar 10, 2009 at 2:45 pm
    Hi

    I just checked the code of http component, we are not using the cached
    stream in it. A JIRA[1] is created for tracing this requirement.
    I will also update the wiki page for the cached stream stuff.

    [1]https://issues.apache.org/activemq/browse/CAMEL-1445

    Willem

    Claus Ibsen wrote:
    On Tue, Mar 10, 2009 at 10:39 AM, _Jens wrote:
    Hi,

    I have tried to use the http component to download bigger files from a
    server. Initially I thought that I would get the input stream from the
    response in the body of the exchange. But as far as I can tell I'm always
    getting a ByteArrayInputStream, which means the stream is somehow getting
    changed. In fact, when downloading a bigger file I get an OutOfMemoryError.
    Is there some way to configure the http component not to do this? Are there
    any recommendations for dealing with bigger files or streaming in general?
    William Jiang is working on to add a feature to store big stream into
    temporary files in Camel 2.0, so you would avoid the memory issue.

    I dont know how far he got but it should be based on existing
    code/feature in Apache CXF. What is needed is some documentation and
    how to setup and configure it.




    Thanks,
    Jens
    --
    View this message in context: http://www.nabble.com/Downloading-big-files-via-the-http-component-tp22430845p22430845.html
    Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedMar 10, '09 at 9:39a
activeMar 10, '09 at 2:45p
posts3
users3
websitecamel.apache.org

People

Translate

site design / logo © 2023 Grokbase