Skip to content

Release 2.0.0 - #729

Merged
ttypic merged 1 commit into
mainfrom
release/2.0.0
Nov 2, 2026
Merged

ttypic merged 1 commit into
mainfrom
release/2.0.0

Conversation

@ttypic

@ttypic ttypic commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

The 2.0.0 release makes it clear what to use on a device and what to use on a server. The SDK is now published as github.com/ably/ably-pubsub-go/v2 and is split by where your code runs. Import server/pubsub for code that runs on your own infrastructure, or device/pubsub for code that runs on an end user's device. Each package offers only the clients and APIs that make sense on its side, so device code can't reach for server-only APIs by mistake. The import paths are also what coding assistants see, so they get the choice right too.

Configuring which Ably endpoint to connect to is simpler: a single WithEndpoint option replaces the separate environment and host options, and old host options now fail to compile instead of silently connecting somewhere else.

v2 also removes the APIs and client options deprecated in v1.

Below is an overview of the major changes in this release. Please refer to the migration guide for the full details, including a list of all breaking changes and instructions on how to address them.

Per-side packages

The github.com/ably/ably-go/ably package no longer exists. Import the package for the side of the connection your code runs on:

  • github.com/ably/ably-pubsub-go/v2/server/pubsub for code that runs on infrastructure you operate and authenticates with an API key. It offers a realtime client, RealtimeClient, and an HTTP client, HTTPClient, created with NewRealtimeClient and NewHTTPClient. Server connections are exempt from monthly-active-user counting.
  • github.com/ably/ably-pubsub-go/v2/device/pubsub for applications on end-user devices, identified by a clientId and authenticated with tokens issued by your server. It offers a single realtime client, Client, created with NewClient, and leaves out the HTTP-only API.

Both packages are named pubsub and re-export everything they need — channels, messages, presence, options and errors — so an application imports exactly one of them. The re-exports are type aliases, so the types are the same in both packages. The implementation now lives under internal/ and can no longer be imported directly.

#713, #718, #727

Client API naming

  • The REST prefix is now HTTP, so type names describe the transport: ably.REST is pubsub.HTTPClient, ably.NewREST is pubsub.NewHTTPClient, and RESTChannel, RESTChannels, RESTPresence, RESTRequest and RESTPaginatedItems become HTTPChannel, HTTPChannels, HTTPPresence, HTTPRequest and HTTPPaginatedItems. WithIdempotentRESTPublishing keeps its name, which comes from the specification. #713, #726
  • The LiveObjects types moved, unchanged, from ably/objects to the shared github.com/ably/ably-pubsub-go/v2/objects package. #724
  • Requests identify themselves as ably-pubsub-go/<version> in the Ably-Agent header, together with ably-pubsub-server or ably-pubsub-device. Update any proxy rules or log queries that match on ably-go/. #713, #722

Server authentication

Clients from server/pubsub declare themselves as servers. Authenticate them with an API key; token authentication works only with a token carrying the signed x-ably-clientType=server claim, which today means a JWT. Other tokens are rejected with error 40167. Clients from device/pubsub are not affected. #722

Endpoint configuration

WithEnvironment, WithRESTHost, WithRealtimeHost and WithFallbackHostsUseDefault are removed in favour of WithEndpoint, which selects the host for both HTTP requests and the realtime connection. For example, WithEnvironment("sandbox") becomes WithEndpoint("nonprod:sandbox"). Default fallback hosts now apply automatically, and a custom port no longer disables them. Clients that set no host option connect to the same hosts as before; if you used the removed options, check your firewall or proxy rules before upgrading. #719

Channel release

Channels.Release no longer takes a context.Context and no longer detaches the channel for you. It returns an error with code ErrChannelReleaseInvalidState (90011) unless the channel is INITIALIZED, DETACHED or FAILED, so detach the channel first. A channel that is already in one of those states is released without a detach attempt, so a FAILED channel, or one on a closing or failed connection, can now be released; previously Release returned an error and left it in place. #716, #717, #728

Removed APIs

  • Connection.RecoveryKey() is removed; use Connection.CreateRecoveryKey().
  • RESTChannel.PublishMultipleWithOptions is removed; use HTTPChannel.PublishMultiple.
  • PublishMultipleWithParams is removed; use PublishWithParams.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 40 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 26c59985-4c27-4dea-a242-49a9b39c4ea2
Commits

Reviewing files that changed from the base of the PR and between e5b1879 and 76f2483.

Files selected for processing: 1
  • CHANGELOG.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ttypic ttypic changed the title Update change log for 2.0.0. Release 2.0.0. Nov 2, 2026
@ttypic ttypic changed the title Release 2.0.0. Release 2.0.0 Nov 2, 2026
@ttypic
ttypic requested a review from splindsay-92 November 2, 2026 18:14
@ttypic
ttypic merged commit 6fc28af into main Nov 2, 2026
9 checks passed
@ttypic
ttypic deleted the release/2.0.0 branch November 2, 2026 18:32

This branch was successfully deployed

1 active deployment
staging/pull/729/godoc — 76f24835 Deployed Nov 2, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants