Class EffectDispatcher
java.lang.Object
com.kingsrook.qqq.backend.core.jobs.effects.EffectDispatcher
Delivers outbox effects (spec section 2.13): claims due effects with leases,
calls their targets as the system user, and records the outcome, fenced on
the lease. UNKNOWN outcomes of non-idempotent effects are reconciled through
the target's lookup, never resent blindly; after effectReconcileAttempts they
are queued for review (needsReview, the jobs.effect-unresolved alert, and the
job ends NEEDS_REVIEW). Every pod runs it.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA test seam: called around a delivery (the fault-injection tests halt the JVM there). -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEffectDispatcher(DurableJobsMetaData settings, DurableJobStore jobs, String podId, EffectDispatcher.FaultHook faultHook) Constructor -
Method Summary
Modifier and TypeMethodDescriptionintOne pass: reap dead dispatchers' leases, then claim and handle a batch.
-
Field Details
-
POINT_BEFORE_DELIVER
- See Also:
-
POINT_AFTER_DELIVER
- See Also:
-
-
Constructor Details
-
EffectDispatcher
public EffectDispatcher(DurableJobsMetaData settings, DurableJobStore jobs, String podId, EffectDispatcher.FaultHook faultHook) Constructor
-
-
Method Details
-
dispatchOnce
One pass: reap dead dispatchers' leases, then claim and handle a batch. Returns how many effects it handled.- Throws:
QException
-