You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move quartzScheduler.scheduleJob()/rescheduleJob() from doStart() to
startScheduler() so the startScheduler=false flag is respected. Same
structural fix as CAMEL-24066 for the Spring scheduler. doStart() now
only prepares resources; startScheduler() begins actual scheduling.
Closes#24715
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: components/camel-quartz/src/main/java/org/apache/camel/pollconsumer/quartz/QuartzScheduledPollConsumerScheduler.java
+38-36Lines changed: 38 additions & 36 deletions
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,8 @@ public class QuartzScheduledPollConsumerScheduler extends ServiceSupport
71
71
privatebooleandeleteJob = true;
72
72
privatevolatileCronTriggertrigger;
73
73
privatevolatileJobDetailjob;
74
+
privatevolatilebooleanscheduled;
75
+
privatevolatileTriggerKeyrescheduleKey;
74
76
75
77
@Override
76
78
publicvoidonInit(Consumerconsumer) {
@@ -100,16 +102,43 @@ public void unscheduleTask() {
100
102
101
103
@Override
102
104
publicvoidstartScheduler() {
103
-
// the quartz component starts the scheduler
105
+
if (!scheduled) {
106
+
try {
107
+
if (rescheduleKey != null) {
108
+
LOG.debug("Re-scheduling job: {} with trigger: {}", job, trigger.getKey());
0 commit comments