[ https://issues.apache.org/jira/browse/CAMEL-16325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-16325. --------------------------------- Resolution: Invalid Ask first on the mailing list or chat room to get help > CamelFileNameProduced header not coming when there is no data in the file > ------------------------------------------------------------------------- > > Key: CAMEL-16325 > URL: https://issues.apache.org/jira/browse/CAMEL-16325 > Project: Camel > Issue Type: Bug > Components: came-core > Reporter: Nishtha Rai > Priority: Major > > Hi, > We have created a simple camel route - > @Override@Override public void configure() throws Exception \{ > from("file://C:/in/?fileName=Input_UTF8.txt") .process(exchange -> { > System.out.println("Headers after in: "+ exchange.getIn().getHeaders()); > }) .onCompletion() .process(exchange -> \{ > sendFooter(exchange); System.out.println("Headers after > Footer: "+ exchange.getIn().getHeaders()); }) > .end() .process(exchange -> \{ sendHeader(exchange); > System.out.println("Headers after header: "+ exchange.getIn().getHeaders()); > }) .split(body().tokenize(lineSeperator)) .streaming() > .to("file://C:/out/?fileName=Output.txt&fileExist=Append") .process(exchange > -> \{ System.out.println("Headers after each record: "+ > exchange.getIn().getHeaders()); }); } private void sendHeader(Exchange > exchange) \{ ProducerTemplate template = > getContext().createProducerTemplate(); > template.sendBodyAndHeaders("file://C:/out/?fileName=Output.txt&fileExist=Append","header1,header2",exchange.getIn().getHeaders()); > } private void sendFooter(Exchange exchange) \{ ProducerTemplate template > = getContext().createProducerTemplate(); > template.sendBodyAndHeaders("file://C:/out/?fileName=Output.txt&fileExist=Append","footer",exchange.getIn().getHeaders()); > } > > CamelFileNameProduced header is not coming when there is no data in the file > (header and footer will be there) although it is creating a file in the > destination directory. -- This message was sent by Atlassian Jira (v8.3.4#803005)