Threadmill vs Quartz
Quartz has scheduled Java jobs since 2001. Threadmill covers the same ground, durable cron and interval schedules on a cluster, and adds background jobs, retries, a dashboard and typed payloads.
Checked on . Sources: Quartz documentation, Quartz source repository.
Short version
- Choose Threadmill if you are modernising a Quartz setup and also need fire-and-forget jobs, retries and visibility.
- Stay with Quartz if you depend on business calendars and holiday exclusions, trigger vetoes, or a database Threadmill does not support.
Checked on . Sources: Quartz documentation, Quartz source repository.
Comparison
| Quartz | Threadmill | |
|---|---|---|
| Clustering | Opt-in, coordinated through a locks table | Built in; every node works against the store directly |
| Defining work | JobDetail and Trigger objects, registered in code | @Job and @Recurring beans, discovered at startup |
| Job data | Untyped JobDataMap | Typed payload record |
| Background jobs and retries | Build it yourself | Built in, with per-job and per-exception policies |
| Missed firings | Misfire instructions per trigger | DROP or CATCH_UP per task |
| Pausing | Standby on one node | Pause a queue across the cluster |
| Per-key concurrency | Per job class | Exclusive or shared, per key |
| Long-running jobs | No progress channel | Check-ins and a no-progress timeout |
| Threads | Platform thread pool | Virtual threads |
| Dashboard | None | Included |
| Metrics | JMX | Micrometer and OpenTelemetry |
Checked on . Sources: Quartz documentation, Quartz source repository.
What Quartz has that Threadmill does not
- Calendar exclusions for weekends, holidays and business hours
- Trigger listeners that can veto a firing
- A long list of misfire instructions; Threadmill offers two policies
- Support for many more JDBC databases
Migrating
Each Job class becomes a JobHandler. The keys in its JobDataMap become fields of a payload record. Triggers become @Recurring annotations or defineCronTask calls.
Checked on . Sources: Quartz documentation, Quartz source repository.