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

Christian Ribeaud commented on CAMEL-13026:
-------------------------------------------

What you are describing is a workaround. I should basically have two 
{{CSVFormats}}, one for _empty_ file and one for _non-empty_ one.

When writing out a _huge_ *CSV* file, you do not want to keep the content in 
the memory. Instead, you prefer to append to an existing file. And because it 
is possible to specify a header in {{CSVFormat}}, I would expect 
{{CsvMarshaller}} being smart enough to be able to handle such case.

But, I see your point, maybe one DOES want to write out a new file for each 
message. And they all should contain the header.

However, instead of making my routing more complicate, how about being able to:
# Extend {{CsvMarshaller}} to customize it to my needs? (currently not possible)
# Specify a message property to tackle my use case?



> Header written out on each message when marshalling
> ---------------------------------------------------
>
>                 Key: CAMEL-13026
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13026
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-csv
>            Reporter: Christian Ribeaud
>            Priority: Major
>
> When *CSV* marshalling, the header is written out on each message.
> Additionally, {{CsvMarshaller}} is so opaque, making it difficult for 
> customization.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to