keiro
Safe HaskellNone
LanguageGHC2024

Keiro.Outbox.Types

Description

Shared types for the durable integration-event outbox.

The outbox is the durable handoff between "this service has decided to publish this integration event" and "this service has actually published it". The producer subscription writes one outbox row per mapped private event; the publisher worker drains rows into Kafka and marks each one sent, retryable, or dead.

Synopsis

Documentation

newtype OutboxId Source #

Primary key of a keiro_outbox row. Stable across publish retries.

Constructors

OutboxId 

Fields

Instances

Instances details
Generic OutboxId Source # 
Instance details

Defined in Keiro.Outbox.Types

Associated Types

type Rep OutboxId 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxId = D1 ('MetaData "OutboxId" "Keiro.Outbox.Types" "keiro-0.12.0.0-inplace" 'True) (C1 ('MetaCons "OutboxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unOutboxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UUID)))

Methods

from :: OutboxId -> Rep OutboxId x #

to :: Rep OutboxId x -> OutboxId #

Show OutboxId Source # 
Instance details

Defined in Keiro.Outbox.Types

Eq OutboxId Source # 
Instance details

Defined in Keiro.Outbox.Types

Ord OutboxId Source # 
Instance details

Defined in Keiro.Outbox.Types

FromJSON OutboxId Source # 
Instance details

Defined in Keiro.Outbox.Types

ToJSON OutboxId Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxId Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxId = D1 ('MetaData "OutboxId" "Keiro.Outbox.Types" "keiro-0.12.0.0-inplace" 'True) (C1 ('MetaCons "OutboxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unOutboxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UUID)))

data OutboxStatus Source #

Lifecycle state of an outbox row.

Instances

Instances details
Generic OutboxStatus Source # 
Instance details

Defined in Keiro.Outbox.Types

Associated Types

type Rep OutboxStatus 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxStatus = D1 ('MetaData "OutboxStatus" "Keiro.Outbox.Types" "keiro-0.12.0.0-inplace" 'False) ((C1 ('MetaCons "OutboxPending" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OutboxPublishing" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "OutboxSent" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "OutboxFailed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OutboxDead" 'PrefixI 'False) (U1 :: Type -> Type))))
Show OutboxStatus Source # 
Instance details

Defined in Keiro.Outbox.Types

Eq OutboxStatus Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxStatus Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxStatus = D1 ('MetaData "OutboxStatus" "Keiro.Outbox.Types" "keiro-0.12.0.0-inplace" 'False) ((C1 ('MetaCons "OutboxPending" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OutboxPublishing" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "OutboxSent" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "OutboxFailed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OutboxDead" 'PrefixI 'False) (U1 :: Type -> Type))))

data OrderingPolicy Source #

Ordering policy enforced by the publisher worker's claim query.

  • PerKeyHeadOfLine (default) — within a source, a non-terminal row with key k blocks every later row with the same key. Rows with Nothing key bypass the block (Kafka does not promise cross-key order for null-keyed records). One stuck aggregate cannot stall traffic on other aggregates. Ordering is based on created_at, which PostgreSQL sets to transaction-start time; callers that concurrently enqueue the same key through escape hatches must serialize those enqueues themselves if commit order matters.
  • PerSourceStream — within a source, any non-terminal row blocks every later row. Use when ordering matters across keys (rare). This has the same created_at concurrency caveat as PerKeyHeadOfLine.
  • StopTheLine — any failure halts the worker until operator intervention. Use when correctness requires manual review on every failure.
  • BestEffort — failed rows do not block; explicit opt-in only. Safe only when published events have no per-key/causal relationship.

Instances

Instances details
Generic OrderingPolicy Source # 
Instance details

Defined in Keiro.Outbox.Types

Associated Types

type Rep OrderingPolicy 
Instance details

Defined in Keiro.Outbox.Types

type Rep OrderingPolicy = D1 ('MetaData "OrderingPolicy" "Keiro.Outbox.Types" "keiro-0.12.0.0-inplace" 'False) ((C1 ('MetaCons "PerKeyHeadOfLine" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PerSourceStream" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "StopTheLine" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BestEffort" 'PrefixI 'False) (U1 :: Type -> Type)))
Show OrderingPolicy Source # 
Instance details

Defined in Keiro.Outbox.Types

Eq OrderingPolicy Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep OrderingPolicy Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep OrderingPolicy = D1 ('MetaData "OrderingPolicy" "Keiro.Outbox.Types" "keiro-0.12.0.0-inplace" 'False) ((C1 ('MetaCons "PerKeyHeadOfLine" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PerSourceStream" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "StopTheLine" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BestEffort" 'PrefixI 'False) (U1 :: Type -> Type)))

data BackoffSchedule Source #

Backoff curve used to compute next_attempt_at after a failure.

Instances

Instances details
Generic BackoffSchedule Source # 
Instance details

Defined in Keiro.Outbox.Types

Associated Types

type Rep BackoffSchedule 
Instance details

Defined in Keiro.Outbox.Types

type Rep BackoffSchedule = D1 ('MetaData "BackoffSchedule" "Keiro.Outbox.Types" "keiro-0.12.0.0-inplace" 'False) (C1 ('MetaCons "ConstantBackoff" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTime)) :+: C1 ('MetaCons "ExponentialBackoff" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExponentialBackoffOptions)))
Show BackoffSchedule Source # 
Instance details

Defined in Keiro.Outbox.Types

Eq BackoffSchedule Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep BackoffSchedule Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep BackoffSchedule = D1 ('MetaData "BackoffSchedule" "Keiro.Outbox.Types" "keiro-0.12.0.0-inplace" 'False) (C1 ('MetaCons "ConstantBackoff" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTime)) :+: C1 ('MetaCons "ExponentialBackoff" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ExponentialBackoffOptions)))

data ExponentialBackoffOptions Source #

Knobs for ExponentialBackoff. delay = min maxDelay (initial * multiplier ^ (attempt - 1)).

Instances

Instances details
Generic ExponentialBackoffOptions Source # 
Instance details

Defined in Keiro.Outbox.Types

Associated Types

type Rep ExponentialBackoffOptions 
Instance details

Defined in Keiro.Outbox.Types

type Rep ExponentialBackoffOptions = D1 ('MetaData "ExponentialBackoffOptions" "Keiro.Outbox.Types" "keiro-0.12.0.0-inplace" 'False) (C1 ('MetaCons "ExponentialBackoffOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "initial") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTime) :*: (S1 ('MetaSel ('Just "maxDelay") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTime) :*: S1 ('MetaSel ('Just "multiplier") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double))))
Show ExponentialBackoffOptions Source # 
Instance details

Defined in Keiro.Outbox.Types

Eq ExponentialBackoffOptions Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep ExponentialBackoffOptions Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep ExponentialBackoffOptions = D1 ('MetaData "ExponentialBackoffOptions" "Keiro.Outbox.Types" "keiro-0.12.0.0-inplace" 'False) (C1 ('MetaCons "ExponentialBackoffOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "initial") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTime) :*: (S1 ('MetaSel ('Just "maxDelay") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTime) :*: S1 ('MetaSel ('Just "multiplier") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double))))

data OutboxMessage Source #

A request to enqueue one integration event into the outbox. Callers generate outboxId (use a random UUID for ad-hoc enqueues, a deterministic UUID for idempotent retries from a saga/process manager).

Constructors

OutboxMessage 

Fields

Instances

Instances details
Generic OutboxMessage Source # 
Instance details

Defined in Keiro.Outbox.Types

Associated Types

type Rep OutboxMessage 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxMessage = D1 ('MetaData "OutboxMessage" "Keiro.Outbox.Types" "keiro-0.12.0.0-inplace" 'False) (C1 ('MetaCons "OutboxMessage" 'PrefixI 'True) (S1 ('MetaSel ('Just "outboxId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OutboxId) :*: S1 ('MetaSel ('Just "event") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IntegrationEvent)))
Show OutboxMessage Source # 
Instance details

Defined in Keiro.Outbox.Types

Eq OutboxMessage Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxMessage Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxMessage = D1 ('MetaData "OutboxMessage" "Keiro.Outbox.Types" "keiro-0.12.0.0-inplace" 'False) (C1 ('MetaCons "OutboxMessage" 'PrefixI 'True) (S1 ('MetaSel ('Just "outboxId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 OutboxId) :*: S1 ('MetaSel ('Just "event") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IntegrationEvent)))

data OutboxRow Source #

A row read back from keiro_outbox. Worker code consumes these to publish to Kafka; tests use them to assert state transitions.

Constructors

OutboxRow 

Instances

Instances details
Generic OutboxRow Source # 
Instance details

Defined in Keiro.Outbox.Types

Show OutboxRow Source # 
Instance details

Defined in Keiro.Outbox.Types

Eq OutboxRow Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxRow Source # 
Instance details

Defined in Keiro.Outbox.Types

data OutboxPublishOptions Source #

Knobs that govern one invocation of publishClaimedOutbox.

The optional tracer field opts the publisher into OpenTelemetry instrumentation: when present, the publisher opens a Producer-kind span around each publish call, attributing the first row's destination (topic), messageId, and Kafka key per the messaging semantic conventions. When tracer is Nothing (the default) the publisher emits no spans.

Instances

Instances details
Generic OutboxPublishOptions Source # 
Instance details

Defined in Keiro.Outbox.Types

Associated Types

type Rep OutboxPublishOptions 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxPublishOptions Source # 
Instance details

Defined in Keiro.Outbox.Types

data OutboxPublishConfigError Source #

Instances

Instances details
Generic OutboxPublishConfigError Source # 
Instance details

Defined in Keiro.Outbox.Types

Associated Types

type Rep OutboxPublishConfigError 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxPublishConfigError = D1 ('MetaData "OutboxPublishConfigError" "Keiro.Outbox.Types" "keiro-0.12.0.0-inplace" 'False) ((C1 ('MetaCons "InvalidOutboxBatchSize" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: (C1 ('MetaCons "InvalidOutboxMaxAttempts" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "InvalidOutboxPublishingTimeout" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTime)))) :+: ((C1 ('MetaCons "InvalidConstantBackoff" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTime)) :+: C1 ('MetaCons "InvalidExponentialBackoffInitial" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTime))) :+: (C1 ('MetaCons "InvalidExponentialBackoffMultiplier" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double)) :+: C1 ('MetaCons "InvalidExponentialBackoffMaxDelay" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTime) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTime)))))
Show OutboxPublishConfigError Source # 
Instance details

Defined in Keiro.Outbox.Types

Eq OutboxPublishConfigError Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxPublishConfigError Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxPublishConfigError = D1 ('MetaData "OutboxPublishConfigError" "Keiro.Outbox.Types" "keiro-0.12.0.0-inplace" 'False) ((C1 ('MetaCons "InvalidOutboxBatchSize" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: (C1 ('MetaCons "InvalidOutboxMaxAttempts" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "InvalidOutboxPublishingTimeout" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTime)))) :+: ((C1 ('MetaCons "InvalidConstantBackoff" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTime)) :+: C1 ('MetaCons "InvalidExponentialBackoffInitial" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTime))) :+: (C1 ('MetaCons "InvalidExponentialBackoffMultiplier" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double)) :+: C1 ('MetaCons "InvalidExponentialBackoffMaxDelay" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTime) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTime)))))

data OutboxPublishSummary Source #

Aggregate result of one publisher pass.

published + retried + dead equals the number of rows claimed. retried includes rows that were skipped because an earlier row in the same ordered publish group failed; those rows are returned to failed without consuming an attempt. haltedOn is populated only by StopTheLine policy and names the failed pivot row, which is already counted in retried or dead.

Constructors

OutboxPublishSummary 

Fields

Instances

Instances details
Generic OutboxPublishSummary Source # 
Instance details

Defined in Keiro.Outbox.Types

Associated Types

type Rep OutboxPublishSummary 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxPublishSummary = D1 ('MetaData "OutboxPublishSummary" "Keiro.Outbox.Types" "keiro-0.12.0.0-inplace" 'False) (C1 ('MetaCons "OutboxPublishSummary" 'PrefixI 'True) ((S1 ('MetaSel ('Just "claimed") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "published") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "retried") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: (S1 ('MetaSel ('Just "dead") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "haltedOn") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe OutboxId))))))
Show OutboxPublishSummary Source # 
Instance details

Defined in Keiro.Outbox.Types

Eq OutboxPublishSummary Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxPublishSummary Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxPublishSummary = D1 ('MetaData "OutboxPublishSummary" "Keiro.Outbox.Types" "keiro-0.12.0.0-inplace" 'False) (C1 ('MetaCons "OutboxPublishSummary" 'PrefixI 'True) ((S1 ('MetaSel ('Just "claimed") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "published") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "retried") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: (S1 ('MetaSel ('Just "dead") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "haltedOn") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe OutboxId))))))

data OutboxMaintenanceOptions Source #

Knobs for outboxMaintenancePass.

Schedule maintenance less frequently than publish passes; it owns crash reclamation and backlog gauge sampling.

Instances

Instances details
Generic OutboxMaintenanceOptions Source # 
Instance details

Defined in Keiro.Outbox.Types

Associated Types

type Rep OutboxMaintenanceOptions 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxMaintenanceOptions = D1 ('MetaData "OutboxMaintenanceOptions" "Keiro.Outbox.Types" "keiro-0.12.0.0-inplace" 'False) (C1 ('MetaCons "OutboxMaintenanceOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "maxAttempts") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "publishingTimeout") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTime)))
Show OutboxMaintenanceOptions Source # 
Instance details

Defined in Keiro.Outbox.Types

Eq OutboxMaintenanceOptions Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxMaintenanceOptions Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxMaintenanceOptions = D1 ('MetaData "OutboxMaintenanceOptions" "Keiro.Outbox.Types" "keiro-0.12.0.0-inplace" 'False) (C1 ('MetaCons "OutboxMaintenanceOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "maxAttempts") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "publishingTimeout") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTime)))

data OutboxMaintenanceSummary Source #

Result of one outbox maintenance pass.

Constructors

OutboxMaintenanceSummary 

Fields

Instances

Instances details
Generic OutboxMaintenanceSummary Source # 
Instance details

Defined in Keiro.Outbox.Types

Associated Types

type Rep OutboxMaintenanceSummary 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxMaintenanceSummary = D1 ('MetaData "OutboxMaintenanceSummary" "Keiro.Outbox.Types" "keiro-0.12.0.0-inplace" 'False) (C1 ('MetaCons "OutboxMaintenanceSummary" 'PrefixI 'True) (S1 ('MetaSel ('Just "requeued") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: (S1 ('MetaSel ('Just "deadLettered") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "backlog") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int))))
Show OutboxMaintenanceSummary Source # 
Instance details

Defined in Keiro.Outbox.Types

Eq OutboxMaintenanceSummary Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxMaintenanceSummary Source # 
Instance details

Defined in Keiro.Outbox.Types

type Rep OutboxMaintenanceSummary = D1 ('MetaData "OutboxMaintenanceSummary" "Keiro.Outbox.Types" "keiro-0.12.0.0-inplace" 'False) (C1 ('MetaCons "OutboxMaintenanceSummary" 'PrefixI 'True) (S1 ('MetaSel ('Just "requeued") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: (S1 ('MetaSel ('Just "deadLettered") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "backlog") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int))))

defaultPublishOptions :: OutboxPublishOptions Source #

Sensible defaults: batch of 32, ten retry attempts, two-second constant backoff, per-key head-of-line ordering.

defaultMaintenanceOptions :: OutboxMaintenanceOptions Source #

Maintenance defaults match the publisher's retry ceiling and stale-row timeout.

mkOutboxPublishOptions :: OutboxPublishOptions -> Either OutboxPublishConfigError OutboxPublishOptions Source #

Validate outbox publisher options before starting a worker.

statusText :: OutboxStatus -> Text Source #

Wire representation of OutboxStatus used in the status column.

parseStatus :: Text -> Either Text OutboxStatus Source #

Inverse of statusText. Unknown database values are decode failures.

nextDelay :: BackoffSchedule -> Int -> NominalDiffTime Source #

Compute the retry delay for an attempt number (1-based: 1 = first failure, 2 = second failure, …). Used by markOutboxFailedTx to derive next_attempt_at.