You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Sudhakar.kaithepalli" <su...@gmail.com> on 2012/07/13 10:13:32 UTC

camel+quartz schedulers

Hi,

In my project, i used camel and  quartz for scheduling. For time base its
working fine.But for frequency and volume based scheduling i don't have any
idea.Please Help me regarding camel route creation for either for frequency
based or for volume based. Here frequency means no. of files and volume
means file size...

Thanks
Sudhakar K

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

Re: camel+quartz schedulers

Posted by "Sudhakar.kaithepalli" <su...@gmail.com>.
can you tell me how to stop camel routes please. Its urgent to me.


-----
Sudhakar Kaithepalli
--
View this message in context: http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716245.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel+quartz schedulers

Posted by "Sudhakar.kaithepalli" <su...@gmail.com>.
Hi........

           Thanks for your quick response........... 
and
1.) can u tell me how to stop camel route after it hit the FTP server.
one more thing is
2.) how can i find out the size of files in FTP server?


Thanks and regards......


-----
Sudhakar Kaithepalli
--
View this message in context: http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716260.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel+quartz schedulers

Posted by "Sudhakar.kaithepalli" <su...@gmail.com>.


SimpleTrigger means, my camel route like this...

from("quartz://schedulerJob?trigger.repeatInterval=60000&trigger.repeatCount="+SimpleTrigger.REPEAT_INDEFINITELY).to("some
bean method" ).end()

This is wht my camel route using quartz scheduler


-----
Sudhakar Kaithepalli
--
View this message in context: http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716261.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel+quartz schedulers

Posted by Magnus Palmér <ma...@gmail.com>.
Unless you are on a very old version the simple trigger will not fire when
starting the route (the fireNow property)
However if your repeat interval is small it might look like that.

What I normally use is the option of delaying the start of the Quartz
scheduler itself.

Look for "Starting the Quartz scheduler"
http://camel.apache.org/quartz.html


2012/7/19 Sudhakar.kaithepalli <su...@gmail.com>

> Hi to all .........
>
>           I am using Camel and Quartz to schedule a job and in Quartz also
> i
> used SimpleTrigger. But the problem here is the trigger fires while we
> start
> the server itself, we don't want like that. It should fire on configured
> time only not at initial time.
> How to configure it. And the following is my configuration..........
>
>
> from("quartz://SchedulerJob?trigger.repeatInterval="+repeatInterval+"&trigger.repeatCount="+SimpleTrigger.REPEAT_INDEFINITELY)
>
> Thanks and Regards....
>
> -----
> Sudhakar Kaithepalli
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716240.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: camel+quartz schedulers

Posted by "Sudhakar.kaithepalli" <su...@gmail.com>.
Hi to all .........

          I am using Camel and Quartz to schedule a job and in Quartz also i
used SimpleTrigger. But the problem here is the trigger fires while we start
the server itself, we don't want like that. It should fire on configured
time only not at initial time.
How to configure it. And the following is my configuration..........

from("quartz://SchedulerJob?trigger.repeatInterval="+repeatInterval+"&trigger.repeatCount="+SimpleTrigger.REPEAT_INDEFINITELY)

Thanks and Regards....

-----
Sudhakar Kaithepalli
--
View this message in context: http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716240.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel+quartz schedulers

Posted by Pontus Ullgren <ul...@gmail.com>.
Hello,

The file size is available in the message headers (CamelFileLength).
See http://camel.apache.org/file2.html

// Pontus

On Mon, Jul 16, 2012 at 8:25 AM, Sudhakar.kaithepalli
<su...@gmail.com> wrote:
> Hi...
>
>    How to get file size, which is there in ftp server using camel Exchange?
>
>
> -----
> Sudhakar Kaithepalli
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716063.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel+quartz schedulers

Posted by "Sudhakar.kaithepalli" <su...@gmail.com>.
Hi...

   How to get file size, which is there in ftp server using camel Exchange?


-----
Sudhakar Kaithepalli
--
View this message in context: http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716063.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel+quartz schedulers

Posted by "Sudhakar.kaithepalli" <su...@gmail.com>.
Hi Good Morning...

                 Thanks for ur response Pontus...
But i don't want to interact with Active-MQ in between camel route and FTP
server. And on more thing How can i get no. of files in FTP server through
camel route? plz tell me its very urgent to me..

Thanks&Regards..
Sudhakar Kaithepalli



-----
Sudhakar Kaithepalli
--
View this message in context: http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716030.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel+quartz schedulers

Posted by Pontus Ullgren <ul...@gmail.com>.
Ok then I misunderstood your question.

In your case a PollingConsumerPollStrategy [1] might be more suitable.
But I guess it could also be achieved by using a route policy that
starts the FTP route once the correct number of files are present.

[1] http://camel.apache.org/polling-consumer.html

// Pontus


On Fri, Jul 13, 2012 at 1:54 PM, Sudhakar.kaithepalli
<su...@gmail.com> wrote:
> HI.....
>
>        Actually my requirement is i've  a sheduler table in DB.in that
> end-user store frequency as 10 files, every time we need to check with FTP
> during camel route if  FTP contain >=10 files then only we can start actual
> task..
> This is my requirement..............
>
> Thanks and Regards.........
> Sudhakar Kaithepalli
>
>
> -----
> Sudhakar Kaithepalli
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716001.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel+quartz schedulers

Posted by "Sudhakar.kaithepalli" <su...@gmail.com>.
HI.....

       Actually my requirement is i've  a sheduler table in DB.in that
end-user store frequency as 10 files, every time we need to check with FTP
during camel route if  FTP contain >=10 files then only we can start actual
task..
This is my requirement..............

Thanks and Regards.........
Sudhakar Kaithepalli


-----
Sudhakar Kaithepalli
--
View this message in context: http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716001.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel+quartz schedulers

Posted by "Sudhakar.kaithepalli" <su...@gmail.com>.
Hi Pontus ...

      ThankQ for ur reply Pontus ..


-----
Sudhakar Kaithepalli
--
View this message in context: http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5715999.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel+quartz schedulers

Posted by Pontus Ullgren <ul...@gmail.com>.
Hi,

For the frequency I belive you can use the Throttler pattern.
http://camel.apache.org/throttler.html

For volume you can write a RoutePolicy to suspend/resume the routes
when certain condtitions met.
See http://camel.apache.org/routepolicy.html and
http://camel.apache.org/route-throttling-example.html

I guess you could also write your own processor that simply checks if
the condition in met and then blocks for a period of time.

// Pontus


On Fri, Jul 13, 2012 at 10:13 AM, Sudhakar.kaithepalli
<su...@gmail.com> wrote:
> Hi,
>
> In my project, i used camel and  quartz for scheduling. For time base its
> working fine.But for frequency and volume based scheduling i don't have any
> idea.Please Help me regarding camel route creation for either for frequency
> based or for volume based. Here frequency means no. of files and volume
> means file size...
>
> Thanks
> Sudhakar K
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992.html
> Sent from the Camel - Users mailing list archive at Nabble.com.