Skip to content

Conversation

hongalex
Copy link
Member

@hongalex hongalex commented May 8, 2025

This is a release of the new Pub/Sub v2 library which is ⚠️ backwards incompatible with the v1. The differences are summarized below:

  1. The existing resource management API (admin operations) will be deprecated, and replaced with the gRPC autogenerated surface that the other packages in this repository use. This includes CRUDL operations for topics, subscriptions, and schemas as well as IAM.
  2. The Topic and Subscription structs will be renamed to Publisher and Subscriber respectively
  3. Removed settings: (ReceiveSettings.Synchronous, PublishSettings.BufferedByteLimit, ReceiveSettings.UseLegacyFlowControl)
  4. Settings rename (e.g. MaxExtensionPeriod -> MaxDurationPerAckExtension)
  5. Changes in defaults (ReceiveSettings.NumGoroutines will now default to 1)
  6. Error types related to Publisher/Subscribers are being renamed: ErrTopicStopped -> ErrPublisherStopped

We plan to support the cloud.google.com/go/pubsub (henceforth known as the v1 library) for 1 year from when the v2 library is released, to give developers proper time to migrate to the v2. We will prioritize new features in v2, but providing security and bug fixes in the v1.

Fixes #11368

* refactor imports to support v2

* remove handwritten schema client

* remove handwritten topic admin methods

* remove handwritten subscription admin methods

* remove admin operations only tests

* delete handwritten snapshot methods
* deprecate(pubsub/v2): deprecate and rename user settings

* remove more code related to synchronous and byte limit
* refactor(pubsub/v2): make tests use new GAPIC library

* remove examples for list operations that are no longer part of this library
* rename data plane clients

* add renamed data clients

* revert changes to filenames

* rename subscriber

* fix go docs referencing topic/subs

* fix remaining data client renames

* remove unused publisher method

* remove TopicInProject

remove TopicInProject
* chore(pubsub): revert v2 gapic to HEAD

* revert info.go changes
* chore(pubsub): replace go.mod and go.work files in v1

* fix go.work formatting

* run go mod tidy
* chore(pubsub): rename data clients and update documentation

* more data plane renaming
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label May 8, 2025
@hongalex hongalex added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 13, 2025
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 13, 2025
hongalex added 3 commits May 14, 2025 13:20
* feat(pubsub): add back v2 helper libraries

* fix copyright header year for new files

* update internal/testutil package version
* docs(pubsub): add migration guide to v2

* additional code formatting and edits to migration guide
shollyman
shollyman previously approved these changes Jul 14, 2025
quartzmo
quartzmo previously approved these changes Jul 14, 2025
@hongalex hongalex dismissed stale reviews from quartzmo and shollyman via 748493b July 14, 2025 18:19
@hongalex hongalex merged commit c798f62 into main Jul 14, 2025
13 of 15 checks passed
@hongalex hongalex deleted the pubsub-v2-trunk branch July 14, 2025 21:48
philicious added a commit to philicious/sdk-go that referenced this pull request Aug 18, 2025
philicious added a commit to philicious/sdk-go that referenced this pull request Aug 18, 2025
See googleapis/google-cloud-go#12218 for reference
Signed-off-by: Philipp Schuler <philipp.schuler@command-b.de>
philicious added a commit to philicious/sdk-go that referenced this pull request Aug 18, 2025
See googleapis/google-cloud-go#12218 for reference
Signed-off-by: Philipp Schuler <philipp.schuler@command-b.de>
philicious added a commit to philicious/sdk-go that referenced this pull request Aug 18, 2025
See googleapis/google-cloud-go#12218 for reference
Signed-off-by: Philipp Schuler <philipp.schuler@command-b.de>
philicious added a commit to philicious/sdk-go that referenced this pull request Aug 24, 2025
See googleapis/google-cloud-go#12218 for reference

Signed-off-by: Philipp Schuler <philipp.schuler@command-b.de>
philicious added a commit to philicious/sdk-go that referenced this pull request Aug 25, 2025
See googleapis/google-cloud-go#12218 for reference

Signed-off-by: Philipp Schuler <philipp.schuler@command-b.de>
philicious added a commit to philicious/sdk-go that referenced this pull request Sep 2, 2025
See googleapis/google-cloud-go#12218 for reference

Signed-off-by: Philipp Schuler <philipp.schuler@command-b.de>
philicious added a commit to philicious/sdk-go that referenced this pull request Sep 2, 2025
See googleapis/google-cloud-go#12218 for reference

Signed-off-by: Philipp Schuler <philipp.schuler@command-b.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pubsub: release v2 library
4 participants