Skip to content

Replay queue for new subscribers #4

@TheoBabilon

Description

@TheoBabilon

Hi @smithk86,

Thanks for your work on asyncio-multisubscriber-queue!

I think it might be great (but subject to discussion, as this might be out-of-scope for this library) to have some sort of "non-fire-and-forget" functionality where new subscribers would replay the whole history of updates pushed to the multisubscriber-queue; currently it is plain "fire-and-forget" (and this might be by design!) so users need to ensure that subscribers are already subscribed to the queue before producer start producing messages, otherwise messages might just get lost (https://github.com/smithk86/asyncio-multisubscriber-queue/blob/main/asyncio_multisubscriber_queue/queue.py#L105).
This "forces" users to have some flow-control (as this scenario can easily happen in an async-world) between producer and potential consumers, which can be sometimes inconvenient.

Curious on what you think on the above? If this is something you believe might make sense I'm happy to try and tackle this when I get some time.

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