[ 
https://issues.apache.org/jira/browse/CAMEL-10466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15676835#comment-15676835
 ] 

Edoardo Causarano commented on CAMEL-10466:
-------------------------------------------

Hi there,

I pushed some code in the 
https://github.com/ecausarano/camel/tree/fix/dropbox-oom branch but I'm still 
not that happy about the lack of (integration) testing. On the other hand it's 
hard to do when Dropbox itself doesn't provide a testing component 
themselves... any ideas?

In particular, I'm getting NPEs when my code is unable to find a remote file, 
and therefore returns an empty map (previous code would throw an exception).

What's the best approach to handle this condition:
1. throw an exception?
2. log something and interrupt the exchange?
3. Wrap the payload in an optional and Return an empty?
4. Return a null?

> OOM in Dropbox component (uses ByteArrayOutputStream for get)
> -------------------------------------------------------------
>
>                 Key: CAMEL-10466
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10466
>             Project: Camel
>          Issue Type: Bug
>            Reporter: Edoardo Causarano
>              Labels: out-of-memory
>
> Using the Dropbox component to download files will consume large amounts of 
> memory, often producing OOMs.
> This is due to the use of ByteArrayOutputStream objects in the implementation 
> of org.apache.camel.component.dropbox.core.DropboxAPIFacade
> The component should use 
> org.apache.camel.converter.stream.OutputStreamBuilder instead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to