FAQ
My routes are using custom object trees which are being marshalled using a
custom DataFormat and outputted to file endpoints.

Contrary to my naiive expectation this does not lead to the DataFormat
directly outputting to the endpoints underlying OutputStream but always to
an intermediary ByteArrayOutputStream, thus manifesting in memory.

Due to various reasons (e.g. memory usage) this is undesired.

Is there a way to correlate endpoints and DataFormats directly so that
marshalling is able to directly output into the target stream?

Many thanks,
Lars



--
View this message in context: http://camel.465427.n5.nabble.com/Marshalling-directly-to-endpoints-OutputStream-tp5764013.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Search Discussions

  • Lars Ködderitzsch at Mar 12, 2015 at 9:46 am
    I've found a viable solution for my problem by enabling stream-caching for my
    Camel Context (http://camel.apache.org/stream-caching.html).

    This way the marshalling via a DataFormat potentially spools to a temporary,
    camel-managed file if a configured payload size threshold is surpassed.



    --
    View this message in context: http://camel.465427.n5.nabble.com/Marshalling-directly-to-endpoints-OutputStream-tp5764013p5764028.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Siano, Stephan at Mar 12, 2015 at 9:46 am
    Hi Lars,

    No, but if it is only about memory you can enable stream caching on the route. In that case the data will be sent to a StreamCache (and that will be stored in the file system if the data is too big).

    Best regards
    Stephan

    -----Original Message-----
    From: Lars Ködderitzsch
    Sent: Mittwoch, 11. März 2015 16:35
    To: users@camel.apache.org
    Subject: Marshalling directly to endpoints OutputStream

    My routes are using custom object trees which are being marshalled using a
    custom DataFormat and outputted to file endpoints.

    Contrary to my naiive expectation this does not lead to the DataFormat
    directly outputting to the endpoints underlying OutputStream but always to
    an intermediary ByteArrayOutputStream, thus manifesting in memory.

    Due to various reasons (e.g. memory usage) this is undesired.

    Is there a way to correlate endpoints and DataFormats directly so that
    marshalling is able to directly output into the target stream?

    Many thanks,
    Lars



    --
    View this message in context: http://camel.465427.n5.nabble.com/Marshalling-directly-to-endpoints-OutputStream-tp5764013.html
    Sent from the Camel - Users mailing list archive at Nabble.com.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedMar 11, '15 at 3:42p
activeMar 12, '15 at 9:46a
posts3
users2
websitecamel.apache.org

People

Translate

site design / logo © 2021 Grokbase