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/09 08:14:26 UTC
I am stuck with Dynamic router/multicast design
Hi
I am trying to achieve concurrent/parallel processing in my requirement, but
I did not get appropriate help in my multiple attempts in this regard.
I have 5 remote directories ( which may be added or removed) which contains
log files, I want to Dow load them for every 15 minutes to my local
directory and want to perform Lucene indexing after completion of ftp
transfer job, I want to add routers dynamically.
Since all those remote machines are different end points , and different
routes. I don't have any particular end point to kickoff all these.
Start
<parallel>
<download remote dir from: sftp1>
<download remote dir from: sftp2>
....
</parallel>
<After above task complete>
<start Lucene indexing>
<end>
Repeat above for every 15 minutes,
I wan to download all folders paralally, Kindly suggest the solution if
anybody worked on similar requirement.
This was my one of previous post:
http://camel.465427.n5.nabble.com/Need-Help-in-configuring-a-router-to-run-to-run-parallally-amp-every-30-minutes-td5740755.html
I tried to use splitter, competive consumer patters but I felt
Like those didn't serve my purpose because I don't need any external end
point or internasl producer to kick of my routes.
I appreciate your help in this regard.
--
View this message in context: http://camel.465427.n5.nabble.com/I-am-stuck-with-Dynamic-router-multicast-design-tp5741210.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: I am stuck with Dynamic router/multicast design
Posted by gudiseashok <gu...@gmail.com>.
If anybody has any idea/thought appreciated, Thanks. :-)
--
View this message in context: http://camel.465427.n5.nabble.com/I-am-stuck-with-Dynamic-router-multicast-design-tp5741210p5741243.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: I am stuck with Dynamic router/multicast design
Posted by gudiseashok <gu...@gmail.com>.
Adding to the above reaponse, I tried using direct and seda to start all my
routes parallel (another route to call these routes) , but it keeps on
calling the routes with that message in my bean. My gut feeling is I am not
using camel framework correctly.
I tried like this,
from (bean:foo? Method=start).multicast ().to (direct:a).to (direct:b)...
>From (direct:a) .from (sftp:xxx).to (localdir)
from (direct:b).from (sftp:xxx).to (localdir)
Pleaee suggest me a right approach,
--
View this message in context: http://camel.465427.n5.nabble.com/I-am-stuck-with-Dynamic-router-multicast-design-tp5741210p5741229.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: I am stuck with Dynamic router/multicast design
Posted by gudiseashok <gu...@gmail.com>.
Hi Raul
Thanks for the response, I have started initially like this. But isben has corrected that by telling me that I should not use the timer to trigger ftp operation but I should do that in sftp component.
I would like to know how to start/initiate these multiple routes (like this multiple remote directories) should be kick started when I don't have a starter end point. I would like to start all ftp operations parallel and on completing those then indexing. Thanks for taking time to reading this post , I really appreciate your help.
isben response to my earlier post:
http://camel.465427.n5.nabble.com/Second-router-in-Pipeline-not-being-reached-in-repeated-interval-scheldule-td5739050.html
"Raul Kripalani [via Camel]" <ml...@n5.nabble.com> wrote:
> Hello,
>
>Have you tried starting your route with a 15 min timer, and then using the
>pollEnrich DSL to fetch the remote files?
>
>http://camel.apache.org/content-enricher.html#ContentEnricher-Contentenrichmentusingthe%7B%7Benrich%7D%7DDSLelement
>
>from("timer:foo?fixedRate=true&period=900000")
> .multicast().parallelProcessing()
> .pollEnrich("ftp:...", new MyFtpAggregationStrategy()) // store
>results in Exchange property?
> .pollEnrich("ftp:...", new MyFtpAggregationStrategy()) // store
>results in Exchange property?
> .end()
> ... process the files ...;
>
>Regards,
>
>*Raúl Kripalani*
>Apache Camel PMC Member & Committer | Enterprise Architect, Open Source
>Integration specialist
>http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
>http://blog.raulkr.net | twitter: @raulvk
>
>On Wed, Oct 9, 2013 at 7:14 AM, gudiseashok <[hidden email]> wrote:
>
>
>> Hi
>>
>> I am trying to achieve concurrent/parallel processing in my requirement,
>> but
>> I did not get appropriate help in my multiple attempts in this regard.
>>
>> I have 5 remote directories ( which may be added or removed) which contains
>> log files, I want to Dow load them for every 15 minutes to my local
>> directory and want to perform Lucene indexing after completion of ftp
>> transfer job, I want to add routers dynamically.
>>
>> Since all those remote machines are different end points , and different
>> routes. I don't have any particular end point to kickoff all these.
>>
>> Start
>> <parallel>
>> <download remote dir from: sftp1>
>> <download remote dir from: sftp2>
>> ....
>> </parallel>
>> <After above task complete>
>> <start Lucene indexing>
>> <end>
>>
>> Repeat above for every 15 minutes,
>>
>> I wan to download all folders paralally, Kindly suggest the solution if
>> anybody worked on similar requirement.
>>
>> This was my one of previous post:
>>
>> http://camel.465427.n5.nabble.com/Need-Help-in-configuring-a-router-to-run-to-run-parallally-amp-every-30-minutes-td5740755.html
>>
>> I tried to use splitter, competive consumer patters but I felt
>> Like those didn't serve my purpose because I don't need any external end
>> point or internasl producer to kick of my routes.
>>
>> I appreciate your help in this regard.
>>
>>
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/I-am-stuck-with-Dynamic-router-multicast-design-tp5741210.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>
>
>
>
>
>
>
>If you reply to this email, your message will be added to the discussion below:
>
> http://camel.465427.n5.nabble.com/I-am-stuck-with-Dynamic-router-multicast-design-tp5741210p5741226.html
>
>
>
> To unsubscribe from I am stuck with Dynamic router/multicast design, click here.
> NAML
>
--
View this message in context: http://camel.465427.n5.nabble.com/I-am-stuck-with-Dynamic-router-multicast-design-tp5741210p5741228.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: I am stuck with Dynamic router/multicast design
Posted by Raul Kripalani <ra...@evosent.com>.
Hello,
Have you tried starting your route with a 15 min timer, and then using the
pollEnrich DSL to fetch the remote files?
http://camel.apache.org/content-enricher.html#ContentEnricher-Contentenrichmentusingthe%7B%7Benrich%7D%7DDSLelement
from("timer:foo?fixedRate=true&period=900000")
.multicast().parallelProcessing()
.pollEnrich("ftp:...", new MyFtpAggregationStrategy()) // store
results in Exchange property?
.pollEnrich("ftp:...", new MyFtpAggregationStrategy()) // store
results in Exchange property?
.end()
... process the files ...;
Regards,
*Raúl Kripalani*
Apache Camel PMC Member & Committer | Enterprise Architect, Open Source
Integration specialist
http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk
On Wed, Oct 9, 2013 at 7:14 AM, gudiseashok <gu...@gmail.com> wrote:
> Hi
>
> I am trying to achieve concurrent/parallel processing in my requirement,
> but
> I did not get appropriate help in my multiple attempts in this regard.
>
> I have 5 remote directories ( which may be added or removed) which contains
> log files, I want to Dow load them for every 15 minutes to my local
> directory and want to perform Lucene indexing after completion of ftp
> transfer job, I want to add routers dynamically.
>
> Since all those remote machines are different end points , and different
> routes. I don't have any particular end point to kickoff all these.
>
> Start
> <parallel>
> <download remote dir from: sftp1>
> <download remote dir from: sftp2>
> ....
> </parallel>
> <After above task complete>
> <start Lucene indexing>
> <end>
>
> Repeat above for every 15 minutes,
>
> I wan to download all folders paralally, Kindly suggest the solution if
> anybody worked on similar requirement.
>
> This was my one of previous post:
>
> http://camel.465427.n5.nabble.com/Need-Help-in-configuring-a-router-to-run-to-run-parallally-amp-every-30-minutes-td5740755.html
>
> I tried to use splitter, competive consumer patters but I felt
> Like those didn't serve my purpose because I don't need any external end
> point or internasl producer to kick of my routes.
>
> I appreciate your help in this regard.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/I-am-stuck-with-Dynamic-router-multicast-design-tp5741210.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>