google-cloud-pubsub 2.22.0 → 3.2.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 +69 -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 +61 -18
  15. data/lib/google/cloud/pubsub/{subscriber → message_listener}/timed_unary_buffer.rb +29 -9
  16. data/lib/google/cloud/pubsub/message_listener.rb +414 -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 +50 -45
  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 +19 -26
  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: 769d41360e1e561290f024664e2090b2a17322f0c7110bc31bb26d45f6a521d9
4
- data.tar.gz: 340c7db4b5f7e27066bde07e838378c0c734738072363567d268b88657135a07
3
+ metadata.gz: 25a5cb88a31551bb6a0ebed4625038b802ec27efcdd8e239291a3ad240bb1713
4
+ data.tar.gz: 63f3c9c3c1662df084e34c519d669ecd6bfca0d44c99000cfc7c7ea417494e6b
5
5
  SHA512:
6
- metadata.gz: c83de697da5723967ed3287d5256cb36ba6a6f010b9882f14893e016c3055772873fcb3dd6e47c89ed950c58ab16c6f1af89e11fb4974f21259233abeae39700
7
- data.tar.gz: f1480d77dacda0b07cce8bb54ef8914014ef27b5371c8a6cf1ff204239485ea0822bc71ff18fe73a18769157d17a80b77a5ee1e48165d5624e3ff0fd2ecf4fb6
6
+ metadata.gz: 6b8101c156e3199b5b4081f86c713f7d51f0de7034293afc37a569aade9ea4c83566ba2958f53bc28bf60f13bc7cac8ca06f6e3a0e7efb178b3862fe5c0635f4
7
+ data.tar.gz: 720cfeb029a5e21de019959b54653daecf05d96e0a1e1239a2f2c22b7d9d71b12287904144884d1555fd20f9218036ee95475e10db117dd845f428fcad56bf0d
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,74 @@
1
1
  # Release History
2
2
 
3
+ ### 3.2.0 (2026-01-30)
4
+
5
+ #### Features
6
+
7
+ * Support adhoc debug logging ([#32404](https://github.com/googleapis/google-cloud-ruby/issues/32404))
8
+
9
+ ### 3.1.1 (2025-12-16)
10
+
11
+ #### Bug Fixes
12
+
13
+ * Remove get_topic lookup when publishing via lazy loading ([#32273](https://github.com/googleapis/google-cloud-ruby/issues/32273))
14
+
15
+ ### 3.1.0 (2025-12-12)
16
+
17
+ #### Features
18
+
19
+ * Add skip_lookup to Project#publisher to enable lazy loading ([#32263](https://github.com/googleapis/google-cloud-ruby/issues/32263))
20
+ #### Documentation
21
+
22
+ * Fix overview documentation URL
23
+
24
+ ### 3.0.3 (2025-11-04)
25
+
26
+ #### Documentation
27
+
28
+ * add warning about loading unvalidated credentials ([#32121](https://github.com/googleapis/google-cloud-ruby/issues/32121))
29
+
30
+ ### 3.0.2 (2025-08-12)
31
+
32
+ #### Bug Fixes
33
+
34
+ * Initialize topic_admin by default for the IAM client ([#30780](https://github.com/googleapis/google-cloud-ruby/issues/30780))
35
+ #### Documentation
36
+
37
+ * Fix subscriber snippet in OVERVIEW.md ([#30813](https://github.com/googleapis/google-cloud-ruby/issues/30813))
38
+
39
+ ### 3.0.1 (2025-08-07)
40
+
41
+ #### Documentation
42
+
43
+ * Update README.md to v3.x ([#30751](https://github.com/googleapis/google-cloud-ruby/issues/30751))
44
+
45
+ ### 3.0.0 (2025-07-29)
46
+
47
+ ### ⚠ BREAKING CHANGES
48
+
49
+ * 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.
50
+ * Rename Topic and Subscription to Publisher and Subscriber, which now serve as dedicated objects for sending and receiving messages.
51
+ * Remove Policy and RetryPolicy in favor of auto-generated counterparts ([#30725](https://github.com/googleapis/google-cloud-ruby/issues/30725))
52
+ * Removal of legacy settings and parameters (e.g. use_legacy_flow_control, project, keyfile)
53
+
54
+ #### Features
55
+
56
+ * 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.
57
+ * Rename Topic and Subscription to Publisher and Subscriber, which now serve as dedicated objects for sending and receiving messages.
58
+ * Introduce path helper methods for accessing resources
59
+ * Removal of legacy settings and parameters (e.g. use_legacy_flow_control, project, keyfile)
60
+ * Remove Policy and RetryPolicy in favor of auto-generated counterparts ([#30725](https://github.com/googleapis/google-cloud-ruby/issues/30725))
61
+ * Change default number of concurrent streams to 1 ([#30742](https://github.com/googleapis/google-cloud-ruby/issues/30742))
62
+
63
+ ### 2.23.0 (2025-07-08)
64
+
65
+ #### Features
66
+
67
+ * Update minimum Ruby version to 3.1 ([#30587](https://github.com/googleapis/google-cloud-ruby/issues/30587))
68
+ #### Bug Fixes
69
+
70
+ * Update google-cloud-pubsub-v1 dependency ([#30591](https://github.com/googleapis/google-cloud-ruby/issues/30591))
71
+
3
72
  ### 2.22.0 (2025-03-27)
4
73
 
5
74
  #### Features