You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by gudiseashok <gu...@gmail.com> on 2013/10/02 15:43:21 UTC

Need Help in configuring a router to run to run parallally & every 30 minutes

As a brief description, I am connecting a remote directory, copying files to
local directory and then indexing them with
lucene. I am using sftp:delay for repeating for every 15 minutes.

I would like to design my system like I mentioned below,

1) I want to do this route for multiple  servers (example: 10) "paralally"
for every 30 minutes,
how do I need achieve parallell processing below route?

2) I want to read the number of servers & config before I start for every 30
minutes, I mean to say I want to add/remove servers which are going to be in
next cycle so count #10 in above point is not fixed.
  
Please see my camel route configuration below, and I want to run below thing
parallel for multiple servers.


<camel:camelContext id="camelFtpContext"
xmlns="http://camel.apache.org/schema/spring" >
	<camel:propertyPlaceholder id="sftpproperties"
location="camel-ftp-config.properties"/>
		<camel:route id="log-index-profiler">
			<camel:from
uri="sftp://@{{sftp.remote.host}}//{{log.directory}}?delay="300000"/>
			<camel:to uri="file://{{sftp.destination.log.directory}}"/>
			<camel:to uri="bean:luceneIndexer?method=luceneIndexing"/>
		</camel:route>
</camel:camelContext>

Thanks for taking time to read my post, and kindly Suggest a best solution.

Regards
Ashok Gudise



--
View this message in context: http://camel.465427.n5.nabble.com/Need-Help-in-configuring-a-router-to-run-to-run-parallally-every-30-minutes-tp5740755.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Need Help in configuring a router to run to run parallally & every 30 minutes

Posted by gudiseashok <gu...@gmail.com>.
Hi Hilderich

Thank you very much for your response, can I do that in XML configuration
instead of Java DSL?
Because Adding to this I want to run this for every 30 minutes, could you
please suggest me how and where to do that?




--
View this message in context: http://camel.465427.n5.nabble.com/Need-Help-in-configuring-a-router-to-run-to-run-parallally-every-30-minutes-tp5740755p5740763.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Need Help in configuring a router to run to run parallally & every 30 minutes

Posted by James Carman <ja...@carmanconsulting.com>.
Are you looking to use the competing consumers pattern?  If so, then
they'll "multicast" themselves.

On Wed, Oct 2, 2013 at 11:54 AM, gudiseashok <gu...@gmail.com> wrote:
> Hi Hilderich
>
> The config which you gave is looks like perfect match for my requirement,
> now only doubt I have is since we are adding multiple
> routes and bydefault camel behaviour is pipeline. Where do I need to ensure
> that this should happen in parrlell (multi-cast may be?)
>
> Regards
> Ashok Gudise
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Need-Help-in-configuring-a-router-to-run-to-run-parallally-every-30-minutes-tp5740755p5740769.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Need Help in configuring a router to run to run parallally & every 30 minutes

Posted by gudiseashok <gu...@gmail.com>.
Hi Hilderich 

The config which you gave is looks like perfect match for my requirement,
now only doubt I have is since we are adding multiple 
routes and bydefault camel behaviour is pipeline. Where do I need to ensure
that this should happen in parrlell (multi-cast may be?)

Regards
Ashok Gudise



--
View this message in context: http://camel.465427.n5.nabble.com/Need-Help-in-configuring-a-router-to-run-to-run-parallally-every-30-minutes-tp5740755p5740769.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Need Help in configuring a router to run to run parallally & every 30 minutes

Posted by Hilderich <hi...@yahoo.de>.
Hello gudiseashok,

When you are willing to start the route above flexible more than once than
you should 
consider to create this route as a dynamic one:



Maybe this is what you need?

Cheers
Hilderich



--
View this message in context: http://camel.465427.n5.nabble.com/Need-Help-in-configuring-a-router-to-run-to-run-parallally-every-30-minutes-tp5740755p5740759.html
Sent from the Camel - Users mailing list archive at Nabble.com.