Skip to content

Dealing with channel overflow for route_listen_stream #37

@bryanlarsen

Description

@bryanlarsen

Channel overflow errors in the route_listen_stream are silently dropped in this crate. We are encountering these errors and need route_listen_stream to be reliable or at the very least report errors.

One possible solution would be to have a new function that returns a broadcast::Receiver in addition to the current route_listen_stream. That way we could detect the RecvError::Lagged the crate is currently ignoring (

broadcast::error::RecvError::Lagged(_) => continue,
),

Preferable would be a reliable interface, somehow. An unbounded channel, perhaps? What we're doing with the change messages is maintaining a list of routes in a tokio::sync::watch channel. If this crate did that it would kill two birds with one stone for us, although I don't know how useful it would be to others.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions