Deprecations
What 0.2 (the move to the official centrifuge-client SDK) deprecated or no longer supports.
0.2.0 replaced the plugin's own client with the official SDK
centrifuge-client. The JavaScript API stayed;
a few things the SDK does not have are deprecated.
| What | Now | Instead |
|---|---|---|
ping() | Resolves when connected, rejects with NotConnected otherwise. Sends nothing. | Nothing: the SDK answers server pings and reconnects on a missing ping. Use isConnected() to check. |
publish with type ≠ 0, key, removed: true (map publish) | Rejected with { Unsupported: "map publish (type/key/removed)" } before anything is sent. | Regular publish. |
subRefresh with items, untrackKeys or type ≠ 0 (track/untrack) | Rejected with { Unsupported: "track/untrack sub refresh" }. | — |
subRefresh.signature | Ignored. | — |
history({ since }) | Ignored. | Subscribe with since. |
| Manual token refresh on a timer | Not needed. | The SDK asks with need_token / need_sub_token before expiry, see Tokens. |
Behaviour changes in 0.2
refresh()answers a pendingneed_token; only when none is pending does it set the token for the next connect.subRefresh()answersneed_sub_tokenand rejects when none is pending.need_tokenis used only whentokenis set orrequestToken: true; anonymous connections no longer wait for the frontend.subscribedcarrieswasRecovering,recovered,streamPosition;connecting/disconnectedcarrycode/reason.- Rust: the old client modules (
client,config,protocol, …) are gone; the SDK is re-exported astauri_plugin_centrifugo::centrifuge.
The full list is in the changelog.