We have trigger that each 30 seconds execute the same job on one of the nodes.
The quartz performs random distribution of jobs between 2 nodes and it is OK.
Here is use case:
1) Node 2 is down.
2) Jobs is triggered on Node 1 for several time
3) We start Node 1 and immediately it receive trigger to execute job….
We would like to avoid this for first 60 minutes.
We would like that job will be triggered on Node 1 first.
So, when executeInternal is called on ‘Node 2’ we fire exception with flag refireImmediately = true
throw new JobExecutionException(true);
Question:
Can we expect that after one node call “throw new JobExecutionException()” the next time quartz will trigger job on another node or it still randomly?
What is another option to cause Quartz to select Node as we prefer?
Is it any option to avoid load balancing in cluster mode?
I want to reach Active/Pasive mode of cluster.
I would like the same node will always take all jobs till node is not down and only when down another node will take jobs.
May be latest version of Quartz allow such functionality?
So, when executeInternal is called on ‘Node 2’ and we fire exception with flag refireImmediately = false, like throw new JobExecutionException();
Does it mean that next time job will be trigered on this 'Node 2' or randomally on any Node?
(To clarify if it is any difference if executeInternal just return or throw new JobExecutionException(false))
2. Active/Active supported.
Active-Pasive NOT supported.
Is it any way to reach 100% round-robin or it is only Randomly behaviour?
To clarify if it is any difference if executeInternal just return or throw new JobExecutionException(false).
1) If executeInternal just return than next time job will be trigered randomally on one of nodes.
2) If executeInternal throw new JobExecutionException()
with refireImmediately = true OR refireImmediately = false
then next time job will be trigered on the same node.