camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beschi <beschi.ag...@gmail.com>
Subject is it better to use aggregator to write a large file hourly using messages from active mq queue?
Date Wed, 21 Dec 2016 05:42:48 GMT
I have a requirement of creating a large file hourly, the content of the
files will be the records/line from active mq queue.

I am using the following code, is there any better option?

		<route id="largeFileWritter">
			<from uri="activemq:queue:so.file.req.in"/>
			<log loggingLevel="INFO" message="Adding record to  File ${body}" />
			<camel:setHeader headerName="fileName">
				<camel:simple>Test File_${date:now:yyyyMMddHHmmssSSS}.txt</camel:simple>
			</camel:setHeader>
			<aggregate strategyRef="aggregatorStrategy" forceCompletionOnStop="true"
completionInterval="8600000">
            	<correlationExpression>
                	<constant>true</constant>
            	</correlationExpression>
            	<to
uri="file://d:/temp/temp1?fileExist=Append&amp;fileName=${headers.fileName}"
/>
        	</aggregate>
		</route>



--
View this message in context: http://camel.465427.n5.nabble.com/is-it-better-to-use-aggregator-to-write-a-large-file-hourly-using-messages-from-active-mq-queue-tp5791784.html
Sent from the Camel Development mailing list archive at Nabble.com.

Mime
View raw message