question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expose Quartz underlying configuration in Quarkus/quartz for perfomance tuning

See original GitHub issue

Currently we are using Quarkus/quartz cluster mode with store-type: jdbc_tx, in a situations where the scheduler has very large numbers of triggers that need to be fired at or near the same time.

Per quartz official documentation http://www.quartz-scheduler.org/documentation/quartz-2.3.0/configuration/ConfigMain.html#configuration-reference the performance expected to improve by setting:

org.quartz.scheduler.batchTriggerAcquisitionFireAheadTimeWindow (the larger the number, the more efficient firing is (in situations where there are very many triggers needing to be fired all at once)

org.quartz.scheduler.batchTriggerAcquisitionMaxCount (the larger the number, the more likely batch acquisition of triggers to fire will be able to select and fire more than 1 trigger at a time)

org.quartz.jobStore.acquireTriggersWithinLock (to avoid data corruption).

But Quarkus/quartz does not expose these properties as configurable. Would it be possible to expose the underlying default quartz configuration so that we can leverage the quartz batch mode?

Quartz provides these configurations: http://www.quartz-scheduler.org/documentation/quartz-2.3.0/configuration/ConfigMain.html And Quarkus/Quartz provides these: https://quarkus.io/guides/quartz#quartz-configuration-reference

@cescoffier

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
geoandcommented, Nov 17, 2022

Seems reasonable to me

0reactions
machi1990commented, Nov 18, 2022

Thanks @fikrutm

The configuration could be declared in https://github.com/quarkusio/quarkus/blob/main/extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzRuntimeConfig.java

The way it was done for https://github.com/quarkusio/quarkus/blob/main/extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzRuntimeConfig.java#L22-L32 could be used as inspiration. The key thing to ensure is that the default value respects the current default behavior so that we do not break existing functionality.

As for property naming:

  1. batchTriggerAcquisitionFireAheadTimeWindow
  2. batchTriggerAcquisitionMaxCount
  3. acquireTriggersWithinLock

Are okay names to me. Ensure that the declared configuration are properly commented as they are used as documentation.

If this is your first time contributing to the repo, I’d suggest you to have a quick look at https://github.com/quarkusio/quarkus/blob/main/CONTRIBUTING.md

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scheduling Periodic Tasks with Quartz - Quarkus
In this guide, we are going to expose one Rest API tasks to visualise the list of tasks created by a Quartz job...
Read more >
Scheduling Periodic Tasks with Quartz - Quarkus
Modern applications often need to run specific tasks periodically. In this guide, you learn how to schedule periodic clustered tasks using the Quartz...
Read more >
Quartz Configuration Reference
Main Configuration (configuration of primary scheduler settings, transactions); Configuration of ThreadPool (tune resources for job execution).
Read more >
Quarkus and Quartz and Configurations especially ... - GitHub
Yes the quarkus configuration is the way to use it. We've not exposed all the underlying quartz configuration but they can be exposed...
Read more >
Home of Quarkus Cheat-Sheet - GitHub Pages
You can embed configuration files inside a dependency by adding META-INF/microprofile.properties inside the JAR. When dependency is added to the application, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found