Skip to content

v2.0.0

Latest

Choose a tag to compare

@m110 m110 released this 25 Aug 14:44

What's Changed

  • Bump Google pubsub client to v2 by @m110 in #42

Full Changelog: v1.2.6...v2.0.0

Major version bump (v2)

Breaking changes & Upgrade instructions

SubscriberConfig no longer exposes the SubscriptionConfig field. Instead, use GenerateSubscription function.

The function returns *pubsubpb.Subscription which mostly maps 1:1 with the old SubscriptionConfig.

                googlecloud.SubscriberConfig{
                        ProjectID:                "tests",
                        GenerateSubscriptionName: subscriptionName,
-                       SubscriptionConfig: pubsub.SubscriptionConfig{
-                               RetainAckedMessages:   false,
-                               EnableMessageOrdering: enableMessageOrdering,
+                       GenerateSubscription: func(params googlecloud.GenerateSubscriptionParams) *pubsubpb.Subscription {
+                               return &pubsubpb.Subscription{
+                                       RetainAckedMessages:   false,
+                                       EnableMessageOrdering: enableMessageOrdering,
+                               }
                        },
                        Unmarshaler: unmarshaler,
                },

SDK update details: https://github.com/googleapis/google-cloud-go/blob/main/pubsub/MIGRATING.md