You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Prasanth Ganesh Rao (Jira)" <ji...@apache.org> on 2026/07/14 03:09:00 UTC
[jira] [Created] (CAMEL-24055) QuartzEndpoint custom calendar name collision when multiple routes use customCalendar
Prasanth Ganesh Rao created CAMEL-24055:
-------------------------------------------
Summary: QuartzEndpoint custom calendar name collision when multiple routes use customCalendar
Key: CAMEL-24055
URL: https://issues.apache.org/jira/browse/CAMEL-24055
Project: Camel
Issue Type: Bug
Components: camel-quartz
Affects Versions: 4.x
Reporter: Prasanth Ganesh Rao
When two or more Quartz routes in the same CamelContext are configured with a customCalendar, the second route silently overwrites the first route's calendar in the shared Quartz scheduler.
*Root cause:*
QuartzEndpoint.doStart() registers every custom calendar under the hardcoded name "CamelQuartzCustomCalendar" (QuartzConstants.QUARTZ_CAMEL_CUSTOM_CALENDAR):
{{scheduler.addCalendar("CamelQuartzCustomCalendar", customCalendar, true, false);}}
The replace=true flag causes the second addCalendar() call to silently overwrite the first. Since all triggers are also wired to the same name via modifiedByCalendar("CamelQuartzCustomCalendar"), every trigger ends up governed by whichever calendar registered last — not the one intended for it.
*Example:*
{{// Route A: fires at most once per day (30-second recurrence calendar)}}
{{{}from("quartz://FrequentTimer?customCalendar=#frequentCalendar&cron=0/2 * * * * ?").to("mock:a");{}}}{{{}// Route B: always-open daily calendar — overwrites FrequentTimer's calendar{}}}
{{from("quartz://DailyTimer?customCalendar=#dailyCalendar&cron=0/2 * * * * ?").to("mock:b");}}
After startup, FrequentTimer fires every 2 seconds instead of being suppressed, because its trigger now references DailyTimer's always-open calendar.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)