90005: Channel resumed in a different region

channel_resumed_in_a_different_region

The client reconnected to a different Ably region from the one it was using, so the position it resumed from could not be applied. The channel attaches at the current point, and no earlier messages are replayed.

What you should do

The channel stays attached and keeps delivering new messages, so nothing is broken. Whether to act on the messages that weren't replayed depends on your application:

  • If it can tolerate missing them, no action is needed and the error can be ignored.
  • If it cannot tolerate missing them, enable persistence on the channel and have your application fetch the messages it did not receive 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.

The record of the order of messages is specific to the region each client was connected to. If a client reconnects to a different region, there is no way to tell which messages it had already received. In this case, the client won't receive any missed messages, only those published from the point it reconnected.

What you'll see

The error is reported with code 90005 and HTTP status 404, with the message Unable to recover channel (unable to resume from a different site) — "site" here is the internal term for a region.