Quantcast

camel+quartz schedulers

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

camel+quartz schedulers

Sudhakar.kaithepalli
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Sudhakar Kaithepalli
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: camel+quartz schedulers

pontus.ullgren
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
<[hidden email]> 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: camel+quartz schedulers

Sudhakar.kaithepalli
Hi Pontus ...

      ThankQ for ur reply Pontus ..
Sudhakar Kaithepalli
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: camel+quartz schedulers

Sudhakar.kaithepalli
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: camel+quartz schedulers

pontus.ullgren
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
<[hidden email]> 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: camel+quartz schedulers

Sudhakar.kaithepalli
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: camel+quartz schedulers

Sudhakar.kaithepalli
Hi...

   How to get file size, which is there in ftp server using camel Exchange?
Sudhakar Kaithepalli
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: camel+quartz schedulers

pontus.ullgren
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
<[hidden email]> 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: camel+quartz schedulers

Sudhakar.kaithepalli
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: camel+quartz schedulers

Sudhakar.kaithepalli

can you tell me how to stop camel routes please. Its urgent to me.
Sudhakar Kaithepalli
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: camel+quartz schedulers

magnuspalmer
In reply to this post by Sudhakar.kaithepalli
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 <[hidden email]>

> 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.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: camel+quartz schedulers

Sudhakar.kaithepalli
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: camel+quartz schedulers

Sudhakar.kaithepalli
This post was updated on .
In reply to this post by magnuspalmer


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

it shows the error message as "String index out of range :-1"
Sudhakar Kaithepalli
Loading...