Allow Broadcast channels to block senders when a receiver is not consuming #20
Labels
part:channels
Affects channels implementation
type:enhancement
New feature or enhancement visitble to users
Milestone
What's needed?
When a broadcast receiver is not getting consumed from fast enough and its buffer has filled up, as new messages arrive, older messages in the receiver's buffer start to get dropped.
In some cases, we might not want messages to get discarded, and instead want the sender to wait for the receiver to drain before it can send further messages to the channel.
Proposed solution
Add an optional
block_on_full
boolean parameter to theget_sender
method of the Broadcast channel, which defaults to False.When true, calls to the
send
async method will not complete until the value has been sent to all the channels.Use cases
No response
Alternatives and workarounds
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: