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.

WhatNowInstead
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.signatureIgnored.—
history({ since })Ignored.Subscribe with since.
Manual token refresh on a timerNot needed.The SDK asks with need_token / need_sub_token before expiry, see Tokens.

Behaviour changes in 0.2

  • refresh() answers a pending need_token; only when none is pending does it set the token for the next connect. subRefresh() answers need_sub_token and rejects when none is pending.
  • need_token is used only when token is set or requestToken: true; anonymous connections no longer wait for the frontend.
  • subscribed carries wasRecovering, recovered, streamPosition; connecting / disconnected carry code / reason.
  • Rust: the old client modules (client, config, protocol, …) are gone; the SDK is re-exported as tauri_plugin_centrifugo::centrifuge.

The full list is in the changelog.