View Source EchoPubSub.Producer.Delivery (EchoPubSub v0.2.4)

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

Drops a task that died without a verdict; the cursor stays, so a retry resends.

Link to this function

finish(state, node, target, verdict)

View Source

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.

@spec running?(EchoPubSub.Producer.State.t(), node()) :: boolean()

Whether a batch to node is in flight.

Starts a delivery task to pid unless node is caught up. Only registered nodes get here.