Stefan B.
Stefan B.

Reputation: 83

Keep camel route active during a specific time range

I have a camel route consuming a JMS queue. Now I have to ensure, this route only runs during a specific time range and is stopped otherwise.

What would be the best design pattern for that? I can't find an appropriate enterprise pattern or component option.

My idea is a quartz-job which start/stops the route.

Thx

Upvotes: 0

Views: 630

Answers (1)

Souciance Eqdam Rashti
Souciance Eqdam Rashti

Reputation: 3193

Have a look at http://camel.apache.org/cronscheduledroutepolicy.html

You can write a cron expression and add that to your route startup policy.

Upvotes: 1

Related Questions