90003: Channel continuity not guaranteed

channel_continuity_not_guaranteed

The client resumed a channel after being disconnected long enough that the point it had reached is no longer available to resume from. The channel reattaches from the earliest point still available, but continuity up to that point is not guaranteed.

What you should do

The channel stays attached and keeps delivering new messages, so nothing is broken. Whether to act on the messages that may have been missed depends on your application:

  • If it can tolerate occasionally missing some messages, no action is needed and the error can be ignored.
  • If it cannot tolerate missing messages, enable persistence on the channel and have your application fetch the messages it might have missed from history whenever it encounters this error.

Why it happens

Clients keep track of the last message they received on a channel. When they reconnect they automatically tell Ably which message that was, so that they can receive any messages they may have missed.

Ably only keeps previous messages for a short time — around two minutes. If a client is disconnected for longer than that, the message it had reached, along with all others older than two minutes, are gone. Ably then reattaches the client at the earliest point still available, and any messages published before that point may not have reached it.

What you'll see

The error is reported with code 90003 and HTTP status 404. The message reads Unable to recover channel (messages expired) — despite that wording, it means continuity is not guaranteed, not that messages are known to have expired.