EndPointBlank.Writers.DelayedWriter (end_point_blank_elixir v0.3.1)

Copy Markdown

Background queue that batches payloads and flushes them every 100 ms.

Payloads for each URL key are accumulated in the GenServer state and sent in batches of up to 4 via DirectWriter on each flush tick. Batches (across all URL keys) are flushed concurrently, bounded by EndPointBlank.Config.worker_count/0 (default 4), so a flush tick never fires more than that many writes in flight at once.

Each URL key's queue is capped at 1000 payloads. If an intake outage (or any slow/hung downstream) causes payloads to accumulate faster than they can be flushed, the oldest payloads for that key are dropped to keep memory usage bounded in the host app.

Summary

Functions

Returns a specification to start this module under a supervisor.

Enqueues payloads to be sent to url_key on the next flush.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts)

write(url_key, payloads)

Enqueues payloads to be sent to url_key on the next flush.