google-cloud-pubsub 2.23.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +12 -1
  3. data/CHANGELOG.md +72 -0
  4. data/OVERVIEW.md +189 -145
  5. data/lib/google/cloud/pubsub/admin_clients.rb +116 -0
  6. data/lib/google/cloud/pubsub/async_publisher.rb +20 -19
  7. data/lib/google/cloud/pubsub/batch_publisher.rb +7 -5
  8. data/lib/google/cloud/pubsub/errors.rb +3 -3
  9. data/lib/google/cloud/pubsub/internal_logger.rb +76 -0
  10. data/lib/google/cloud/pubsub/message.rb +8 -8
  11. data/lib/google/cloud/pubsub/{subscriber → message_listener}/enumerator_queue.rb +1 -1
  12. data/lib/google/cloud/pubsub/{subscriber → message_listener}/inventory.rb +13 -10
  13. data/lib/google/cloud/pubsub/{subscriber → message_listener}/sequencer.rb +1 -1
  14. data/lib/google/cloud/pubsub/{subscriber → message_listener}/stream.rb +57 -16
  15. data/lib/google/cloud/pubsub/{subscriber → message_listener}/timed_unary_buffer.rb +29 -9
  16. data/lib/google/cloud/pubsub/message_listener.rb +413 -0
  17. data/lib/google/cloud/pubsub/project.rb +102 -530
  18. data/lib/google/cloud/pubsub/publisher.rb +424 -0
  19. data/lib/google/cloud/pubsub/received_message.rb +44 -39
  20. data/lib/google/cloud/pubsub/service.rb +34 -385
  21. data/lib/google/cloud/pubsub/subscriber.rb +442 -279
  22. data/lib/google/cloud/pubsub/version.rb +1 -1
  23. data/lib/google/cloud/pubsub.rb +37 -19
  24. data/lib/google-cloud-pubsub.rb +27 -8
  25. metadata +11 -18
  26. data/lib/google/cloud/pubsub/policy.rb +0 -188
  27. data/lib/google/cloud/pubsub/retry_policy.rb +0 -88
  28. data/lib/google/cloud/pubsub/schema/list.rb +0 -180
  29. data/lib/google/cloud/pubsub/schema.rb +0 -378
  30. data/lib/google/cloud/pubsub/snapshot/list.rb +0 -178
  31. data/lib/google/cloud/pubsub/snapshot.rb +0 -205
  32. data/lib/google/cloud/pubsub/subscription/list.rb +0 -205
  33. data/lib/google/cloud/pubsub/subscription/push_config.rb +0 -268
  34. data/lib/google/cloud/pubsub/subscription.rb +0 -1467
  35. data/lib/google/cloud/pubsub/topic/list.rb +0 -171
  36. data/lib/google/cloud/pubsub/topic.rb +0 -1100
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24cac3a1712ee177e68209cfa51b6608e821d3cd0372f4097a0c034cb33c2e84
4
- data.tar.gz: 8af4d2f8bd1f5262f9d0e604bae5fefd14bbf47afdece6d3185d7da159a9406f
3
+ metadata.gz: 500ef51067933f91a1f6134ba3849fae4159f83d79e3f3dc6d6ef9237006e69e
4
+ data.tar.gz: 32be664ffdeed8864e5be601131fc784805fc82564cd4ca03f355894f7c2f588
5
5
  SHA512:
6
- metadata.gz: b5a42f52420c9e8ed940690f9eb5dfa5aa9feee8a1091e4013f4884f2e8a859f2abf8e4451d7f136fe03c0482ccb42def169464ad57da08faef15c57a95b913b
7
- data.tar.gz: eb8fe09a16a9348c89738af001c0d7cb4bc3d52a009753106f6c8241088b0141d1c08c384494b8c91414775394d096104b901f90b7c98015a59397c9419ba2be
6
+ metadata.gz: a75dd428cfa30499d42c0bd5b4a5726cd2c5029768adf0c027177c7e4ccbbfd982115b459bf310fe96cf2597fb90aae351a4a60157c0b436ea5253c5f3fa53cb
7
+ data.tar.gz: 7160f84ef94817b60a6e53d57e37c586dd44c5ecbb31b9f8e181be42a67f4b6d3c2a735ac0dc70631c4f340ba632748fbe7018c9bad0dec1acc0061fa9272018
data/AUTHENTICATION.md CHANGED
@@ -46,6 +46,12 @@ code.
46
46
 
47
47
  **Credentials** are discovered in the following order:
48
48
 
49
+ > [!WARNING]
50
+ > If you accept a credential configuration (JSON file or Hash) from an
51
+ > external source for authentication to Google Cloud, you must validate it before
52
+ > providing it to a Google API client library. Providing an unvalidated credential
53
+ > configuration to Google APIs can compromise the security of your systems and data.
54
+
49
55
  1. Specify credentials in method arguments
50
56
  2. Specify credentials in configuration
51
57
  3. Discover credentials path in environment variables
@@ -100,11 +106,16 @@ The **Project ID** and the path to the **Credentials JSON** file can be configur
100
106
  instead of placing them in environment variables or providing them as arguments.
101
107
 
102
108
  ```ruby
109
+ require "googleauth"
103
110
  require "google/cloud/pubsub"
104
111
 
112
+ credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
113
+ json_key_io: ::File.open("/path/to/keyfile.json")
114
+ )
115
+
105
116
  Google::Cloud::PubSub.configure do |config|
106
117
  config.project_id = "my-project-id"
107
- config.credentials = "path/to/keyfile.json"
118
+ config.credentials = credentials
108
119
  end
109
120
 
110
121
  client = Google::Cloud::PubSub.new
data/CHANGELOG.md CHANGED
@@ -1,5 +1,77 @@
1
1
  # Release History
2
2
 
3
+ ### 3.3.0 (2026-06-11)
4
+
5
+ #### Features
6
+
7
+ * Upgrade to Ruby 3.2 minimum ([#33944](https://github.com/googleapis/google-cloud-ruby/issues/33944))
8
+
9
+ ### 3.2.1 (2026-03-04)
10
+
11
+ #### Bug Fixes
12
+
13
+ * clean up warnings for pubsub veneer ([#32785](https://github.com/googleapis/google-cloud-ruby/issues/32785))
14
+
15
+ ### 3.2.0 (2026-01-30)
16
+
17
+ #### Features
18
+
19
+ * Support adhoc debug logging ([#32404](https://github.com/googleapis/google-cloud-ruby/issues/32404))
20
+
21
+ ### 3.1.1 (2025-12-16)
22
+
23
+ #### Bug Fixes
24
+
25
+ * Remove get_topic lookup when publishing via lazy loading ([#32273](https://github.com/googleapis/google-cloud-ruby/issues/32273))
26
+
27
+ ### 3.1.0 (2025-12-12)
28
+
29
+ #### Features
30
+
31
+ * Add skip_lookup to Project#publisher to enable lazy loading ([#32263](https://github.com/googleapis/google-cloud-ruby/issues/32263))
32
+ #### Documentation
33
+
34
+ * Fix overview documentation URL
35
+
36
+ ### 3.0.3 (2025-11-04)
37
+
38
+ #### Documentation
39
+
40
+ * add warning about loading unvalidated credentials ([#32121](https://github.com/googleapis/google-cloud-ruby/issues/32121))
41
+
42
+ ### 3.0.2 (2025-08-12)
43
+
44
+ #### Bug Fixes
45
+
46
+ * Initialize topic_admin by default for the IAM client ([#30780](https://github.com/googleapis/google-cloud-ruby/issues/30780))
47
+ #### Documentation
48
+
49
+ * Fix subscriber snippet in OVERVIEW.md ([#30813](https://github.com/googleapis/google-cloud-ruby/issues/30813))
50
+
51
+ ### 3.0.1 (2025-08-07)
52
+
53
+ #### Documentation
54
+
55
+ * Update README.md to v3.x ([#30751](https://github.com/googleapis/google-cloud-ruby/issues/30751))
56
+
57
+ ### 3.0.0 (2025-07-29)
58
+
59
+ ### ⚠ BREAKING CHANGES
60
+
61
+ * The existing resource management API has been removed and replaced with the gRPC autogenerated surface. It includes CRUDL operations for topics, subscriptions, snapshots, and schemas as well as IAM. All legacy handwritten resource management classes are now deleted and operations will be performed via the generated clients.
62
+ * Rename Topic and Subscription to Publisher and Subscriber, which now serve as dedicated objects for sending and receiving messages.
63
+ * Remove Policy and RetryPolicy in favor of auto-generated counterparts ([#30725](https://github.com/googleapis/google-cloud-ruby/issues/30725))
64
+ * Removal of legacy settings and parameters (e.g. use_legacy_flow_control, project, keyfile)
65
+
66
+ #### Features
67
+
68
+ * The existing resource management API has been removed and replaced with the gRPC autogenerated surface. It includes CRUDL operations for topics, subscriptions, snapshots, and schemas as well as IAM. All legacy handwritten resource management classes are now deleted and operations will be performed via the generated clients.
69
+ * Rename Topic and Subscription to Publisher and Subscriber, which now serve as dedicated objects for sending and receiving messages.
70
+ * Introduce path helper methods for accessing resources
71
+ * Removal of legacy settings and parameters (e.g. use_legacy_flow_control, project, keyfile)
72
+ * Remove Policy and RetryPolicy in favor of auto-generated counterparts ([#30725](https://github.com/googleapis/google-cloud-ruby/issues/30725))
73
+ * Change default number of concurrent streams to 1 ([#30742](https://github.com/googleapis/google-cloud-ruby/issues/30742))
74
+
3
75
  ### 2.23.0 (2025-07-08)
4
76
 
5
77
  #### Features