camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From klauss42 <klaus.schroe...@ethalon.de>
Subject Concat routes
Date Tue, 15 Jan 2013 16:50:02 GMT
Hello Camel experts
I have multiple routes that perform some background processing, in detail
the routes just trigger some Spring-Batch jobs. I want to be able to start
each single route alone, therefore I am using the Servlet component to be
able to trigger the routes by URL.

Now I wanted to concatenate the routes in a new route. The routes should be
perfromed in sequential order. I tried multicast with
"parallelProcessing=false" and that works fine if the new route
"invoiceProcessingRoute" gets triggerred by the Servlet component. The
routes get started in proper sequence. Here is an excerpt of my Camel
config:

		<route id="invoiceProcessingServlet">
			<from uri="servlet:///invoiceProcessing" />
			<to uri="vm:invoiceProcessing?timeout=0" />
			<transform>
				<constant>Invoice Processing job finished</constant>
			</transform>
		</route>
	
		<route id="invoiceProcessingRoute">
			<from uri="vm:invoiceProcessing" />
			<camel:multicast parallelProcessing="false" stopOnException="false">
				<to uri="vm:invoiceMapping?timeout=0" />
				<to uri="vm:invoiceControl?timeout=0" />
				<to uri="vm:invoiceAccounting?timeout=0" />
			</camel:multicast>
		</route>

But if I use the Quartz component to trigger the above route by a cron, the
individual routes get started in parallel, which is not the indented
behavior. Here is the scheduled route:

		<route id="invoiceProcessingScheduled"
autoStartup="{{il.cron.invoiceProcessing.startup}}">
			<from
uri="quartz://invoiceProcessing/?stateful=true&amp;cron={{il.cron.invoiceProcessing}}"
/>
			<to uri="vm:invoiceProcessing" />
		</route>
		
The problem is the parallel execution. Do I misunderstand something? Is it a
bug? What is the recommended way to start routes sequentially? 

Remark: In these routes I do not use the content of any messages, I just use
Camel to start my Spring-batch jobs. 

Thanks for any help
Klaus



--
View this message in context: http://camel.465427.n5.nabble.com/Concat-routes-tp5725581.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message