Slow consumer

A slow consumer is a client that receives messages more slowly than the server produces them. In this course, a full per-client send buffer causes non-blocking delivery to fail, allowing the hub to disconnect that client instead of blocking message delivery to other customers.

Minimal example

go
select {
case c.send <- message:
    return true
default:
    return false
}

Learn this concept

Lesson 5.2 · Managing WebSocket connections

Used in exercises

Exercise 5.3 · Per-user WebSocket hub Exercise 5.16 · Topic subscription registry