简体   繁体   English

如何使用石英2 cron轮询骆驼中的平方

[英]How to poll the sqs in camel using the quartz2 cron

I have to poll the AWS queue in configured time. 我必须在配置的时间内轮询AWS队列。 So, I preferred to use the quartz2 cron configuration. 因此,我更喜欢使用quartz2 cron配置。 Please see below for code snippet.. 请参见下面的代码段。

from("quartz2://instructor?cron=0 0/30 * * * ?")
.routeId("instruction route").log("after 30 min delay")
.from(getQueueUrl())
.bean(rocessor, "process(*)").end();

But here the route is started to poll the queue when my application starts. 但是在这里,当我的应用程序启动时,路由开始轮询队列。 Please suggest / advise me.... 请建议/建议我...

aws-sqs组件支持使用quartz2作为其调度程序,有关详细信息,请参见: http ://camel.apache.org/polling-consumer.html和此博客: http ://www.davsclaus.com/2013/08 /apache-camel-212-even-easier-cron.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM