Bounded asynchronous delivery queue for observational journal writes.
Deliveries are serialized within a partition and may run concurrently across partitions. Recorder partitions are keyed by store module, so a slow store cannot head-of-line block an unrelated store. The global queue and worker bound prevent failed stores from creating unbounded tasks.
Summary
Functions
Returns a specification to start this module under a supervisor.
Adds a zero-arity delivery function to the bounded queue.
Returns privacy-safe queue, delivery, drop, and latency counters.
Types
@type enqueue_option() :: {:buffer_size, pos_integer()} | {:overflow, :drop_newest | :drop_oldest} | {:partition, term()}
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec enqueue((-> term()), [enqueue_option()]) :: :ok | {:ok, :dropped_oldest} | {:error, term()}
Adds a zero-arity delivery function to the bounded queue.
@spec stats(GenServer.server()) :: map()
Returns privacy-safe queue, delivery, drop, and latency counters.