View Source EchoPubSub.Producer.Delivery (EchoPubSub v0.2.3)
Sends a registered node what it still needs, in a task. The node's cursor moves to the batch's target only when its worker acks, so a failed batch is resent.
A failed call may still sit in a hung worker's mailbox, so the node is probed
with :ping before the batch or registration is resent: the worker answers in
mailbox order, after handling that call. Without it, every retry would queue
another copy.
Summary
Functions
Drops a task that died without a verdict; the cursor stays, so a retry resends.
Applies the task's verdict, then flushes again if writes piled up behind the batch.
Pings pid in a task after node failed a registration or delivery; the
next attempt waits for its answer. Tracked as the node's call in flight.
Whether a batch to node is in flight.
Starts a delivery task to pid unless node is caught up. Only registered nodes get here.
Functions
@spec abort(EchoPubSub.Producer.State.t(), node()) :: EchoPubSub.Producer.State.t()
Drops a task that died without a verdict; the cursor stays, so a retry resends.
@spec finish( EchoPubSub.Producer.State.t(), node(), EchoPubSub.Producer.State.cursor() | :probe, EchoPubSub.Producer.Remote.verdict() | :ok | :error ) :: EchoPubSub.Producer.State.t()
Applies the task's verdict, then flushes again if writes piled up behind the batch.
@spec probe(EchoPubSub.Producer.State.t(), pid(), node()) :: EchoPubSub.Producer.State.t()
Pings pid in a task after node failed a registration or delivery; the
next attempt waits for its answer. Tracked as the node's call in flight.
@spec running?(EchoPubSub.Producer.State.t(), node()) :: boolean()
Whether a batch to node is in flight.
@spec start(EchoPubSub.Producer.State.t(), pid(), node()) :: EchoPubSub.Producer.State.t()
Starts a delivery task to pid unless node is caught up. Only registered nodes get here.