pub const RECOMMENDED_CAPACITY: RecommendedCapacity;Expand description
Events to retain for a stream whose payload size is unmeasured.
1024, and the number is a guess with a stated basis rather than a constant someone liked. Two observations set it:
- It is a reconnect window, not a session window. A client that has been gone for longer than the window is expected to resume from the beginning of what is retained, or to be told there is a gap.
- It is sized for the notification traffic the transport actually carries
on a stream — progress and message notifications for the request they
relate to, not
resources/readbodies, which in2025-11-25and earlier flow on the response stream of their own request.
At a notional one progress notification per second that is roughly seventeen minutes of disconnection. The memory cost is 1024 slots, and it is the payload that decides whether that is cheap, which is exactly why an adapter streaming large bodies should pass a smaller number of its own choosing. Nothing in the specification requires any particular bound.
recommended_capacity_covers_a_reconnect
is the test that holds this reasoning to the number.