You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2013/11/12 10:04:18 UTC
[jira] [Updated] (CAMEL-6899) Stream component has various
problems.
[ https://issues.apache.org/jira/browse/CAMEL-6899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-6899:
-------------------------------
Labels: (was: onCompletion stream)
Issue Type: Improvement (was: Bug)
Remaining Estimate: (was: 24h)
Original Estimate: (was: 24h)
> Stream component has various problems.
> ---------------------------------------
>
> Key: CAMEL-6899
> URL: https://issues.apache.org/jira/browse/CAMEL-6899
> Project: Camel
> Issue Type: Improvement
> Components: camel-stream
> Affects Versions: 2.12.1
> Environment: Java 7, Mac OS X
> Reporter: Paolo Morandini
> Attachments: patch.diff
>
>
> Camel stream component has several issues (when using it to transfer big, finite, files):
> - If using groupLines, this component can transfer only a number of lines that's a multiple of this parameter (ie. if groupLines=7 and a file consists of 20 lines you'll send two Exchanges containing rows 1-7 and 8-14, losing rows 15-20)
> - there's no way to know when a stream finished, that renders the onCompletion() hook quite useless
> - Stream producer can produce only from String or byte[], but stream consumer produces either String or List<String>, this makes impossible to use grouping to transfer files between two stream endpoints
> Fastest workaround I found out is to add the chance to specify additional URL parameters in Endpoint configuration (i.e. stream:url?binary=true... ) thus allowing the Consumer to read chunks of files into byte[] and packing them into an Exchange.
> My feeling is that the entire component could be enlisted to go under a deeper review and major refactoring.
> I'm attaching a Patch for your evaluation that should temporarily fix this mis-behaviors, at leas in my working scenario (but I think they're pretty generic).
--
This message was sent by Atlassian JIRA
(v6.1#6144)