Interface EffectTarget

All Known Implementing Classes:
HttpEffectTarget, StorageEffectTarget, TableUpsertEffectTarget

public interface EffectTarget
A system outside the job's database that receives effects (email, an HTTP API, object storage, another database). Registered by name in DurableJobsMetaData.effectTargets; the dispatcher calls it, never chunk code. Implementations must use the request's idempotencyKey the way the target allows (EffectKeys): an Idempotency-Key header, a deterministic object name, an upsert on a natural key, a fixed email Message-ID.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deliver one effect.
    For an effect whose delivery outcome is unknown: look it up at the target by its idempotency key or natural id.
  • Method Details

    • deliver

      EffectResult deliver(EffectRequest request) throws Exception
      Deliver one effect. Report UNKNOWN (or throw) when the request may have reached the target but the answer was lost; never report RETRY or FAILED unless the target definitely did not act. Runs as the system user.
      Throws:
      Exception
    • reconcile

      default ReconcileResult reconcile(EffectRequest request) throws Exception
      For an effect whose delivery outcome is unknown: look it up at the target by its idempotency key or natural id. The default can't tell, which sends the effect to review after the configured reconcile attempts.
      Throws:
      Exception