Package io.outbox.dispatch
package io.outbox.dispatch
Hot-path event dispatcher with dual-queue processing.
OutboxDispatcher drains a hot queue (after-commit callbacks) and a
cold queue (poller fallback) using fair 2:1 weighted round-robin. Supports retry with
exponential backoff, in-flight deduplication, event interception, and graceful shutdown.
-
ClassDescription
ConcurrentHashMap-based in-flight tracker with optional time-based expiry.BridgesOutboxPollerto the dispatcher's cold queue by implementingOutboxPollerHandler.BridgesOutboxWriterto the dispatcher's hot queue by implementingWriterHook.Cross-cutting hook for observing or modifying event dispatch.Retry policy using exponential backoff with jitter.Tracks in-flight events to prevent duplicate concurrent dispatch of the same event.Dual-queue event processor that dispatches outbox events to registered listeners.Builder forOutboxDispatcher.Internal wrapper pairing anEventEnvelopewith its origin queue and attempt count.Indicates whether an event arrived via the hot path or cold (poller) path.Strategy for computing the delay before retrying a failed event dispatch.Thrown when no listener is registered for an event's (aggregateType, eventType) combination.