camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michele <michele.mazzi...@finconsgroup.com>
Subject Flatpack pipe delimiter in xml route
Date Tue, 29 Dec 2015 12:28:37 GMT
Hi everyone,

how to configure flatpack data format to create txt file with pipe
delimiter?

I configure my route like this, but it throws an exception
(IllegalArgumentException: Delimiter must be one character long!):

<camelContext >

  <dataFormats>
		<json library="Jackson" id="jack" include="NON_EMPTY" />
		<flatpack id="fp" ignoreFirstRecord="false" delimiter="\u007C"/>
	</dataFormats>

<route id="TicketRetriever">
		<from uri="quartz2://myTimer?cron=0 0/1 * 1/1 * ? *"/>
		<inOut uri="jetty:http...." />
	    <log message="Message Received(JSON Format): ${body}" />
	    <unmarshal ref="jack" />
	    <log message="Message Received: ${body}" />
	    <process ref="TicketResponseProcessor" />
	    <marshal ref="fp" />
	    <to uri="file:C:/outbox?fileName=export-${date:now:yyyyMMdd}.txt" />
	</route>

</camelContext>

I also tried with \| and \\| but it doesn't work.

Thanks in advance.

Best Regards

Michele



--
View this message in context: http://camel.465427.n5.nabble.com/Flatpack-pipe-delimiter-in-xml-route-tp5775573.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message