Skip to content

Consumer/subscription dies out without reconnect #2

@vicstr

Description

@vicstr

Just spent the last day trying to figure out why the Consumer thread dies out after roughly ~60s of runtime, 😅
this is the way it works and it needs to do a reconnect to the endpoint, involving a Last-Event-ID.
Some details here: https://mercure.rocks/spec#reconciliation

The Consumer thread uses an older library, sseclient-py,
which does no reconciliation, so you have to handle reconciliation yourself.

There is a newer sseclient library that does reconciliation automatically,
attaching last-event-id, restarting the connection when it ends.

sseclient 0.0.27
https://github.com/btubbs/sseclient

Basically the same that used in dunglas subscribe example:
https://github.com/dunglas/mercure/blob/v0.10.4/examples/subscribe/python.py

Is there a reason to keep using sseclient-py specifically at this moment?
I've made a fork to make a version with btubbs/sseclient.
Leaving this out here in case anybody else gets swamped.

Thanks!

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