Quality of Service
Reliability levels for message delivery in Erebus
Quality of Service
Erebus provides configurable Quality of Service (QoS) levels for message delivery, inspired by MQTT.
QoS defines how reliable a message transfer should be, and what guarantees the system provides when clients publish and receive data.
Currently, Erebus supports QoS 0 and QoS 1.
Quality of Service levels
QoS 0 – At most once
Messages are sent without any delivery guarantee.
The server does not acknowledge receipt, and the client will not retry if the message is lost in transit.
This mode is best for:
- Ephemeral updates (e.g. presence pings, typing indicators)
- Scenarios where low latency is more important than guaranteed delivery
In short: fire and forget.
QoS 1 – At least once
Messages are sent and retried until the server acknowledges that they’ve been received.
This guarantees that the message reaches Erebus at least once, but duplicates may occur if the sender retransmits before receiving the ACK.
This mode is best for:
- Chat messages
- Collaborative edits
- Any event where delivery must be reliable
In short: guaranteed delivery, with possible duplicates.
Note:
Erebus does not currently implement QoS 2 (“exactly once”), as the additional handshake adds latency and complexity. For most realtime use cases, QoS 1 combined with deduplication is the right balance of speed and reliability.