Repository navigation
sdk: refactor notification streams and add opt-in receiver gap reporting - #1489
Conversation
Replace boxed streams with `NotificationStream<T>` in client and relay APIs. Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
Introduce optional gap reporting in `NotificationStream`, allowing users to observe skipped notifications using `NotificationStream::with_gaps()` method. Replaces #1482 Co-authored-by: Jeff Gardner <202880+erskingardner@users.noreply.github.com> Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
An alternative to |
|
How can this be useful? For example, when I know that I missed 7 events, what should I do? Should I have a general receiver that caches events, so I can ask it for the missed ones? Or should I re-subscribe? Or just log a warning so I try to handle events faster? |
Yeah, I would say mainly the last one, to identity that the current way of handling notifications is too slow, so fix it somehow, or increase the notifications channel capacity. |
Description
Replaces #1482
CC @erskingardner
Checklist
CHANGELOG.md(if applicable)