google-cloud-pubsub 2.19.0 → 3.0.3

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 (35) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +12 -1
  3. data/CHANGELOG.md +66 -0
  4. data/OVERVIEW.md +188 -144
  5. data/lib/google/cloud/pubsub/admin_clients.rb +116 -0
  6. data/lib/google/cloud/pubsub/async_publisher.rb +9 -9
  7. data/lib/google/cloud/pubsub/batch_publisher.rb +4 -4
  8. data/lib/google/cloud/pubsub/errors.rb +3 -3
  9. data/lib/google/cloud/pubsub/message.rb +8 -8
  10. data/lib/google/cloud/pubsub/{subscriber → message_listener}/enumerator_queue.rb +1 -1
  11. data/lib/google/cloud/pubsub/{subscriber → message_listener}/inventory.rb +2 -4
  12. data/lib/google/cloud/pubsub/{subscriber → message_listener}/sequencer.rb +1 -1
  13. data/lib/google/cloud/pubsub/{subscriber → message_listener}/stream.rb +10 -10
  14. data/lib/google/cloud/pubsub/{subscriber → message_listener}/timed_unary_buffer.rb +1 -1
  15. data/lib/google/cloud/pubsub/message_listener.rb +413 -0
  16. data/lib/google/cloud/pubsub/project.rb +98 -531
  17. data/lib/google/cloud/pubsub/publisher.rb +373 -0
  18. data/lib/google/cloud/pubsub/received_message.rb +50 -45
  19. data/lib/google/cloud/pubsub/service.rb +24 -346
  20. data/lib/google/cloud/pubsub/subscriber.rb +442 -279
  21. data/lib/google/cloud/pubsub/version.rb +1 -1
  22. data/lib/google/cloud/pubsub.rb +26 -18
  23. data/lib/google-cloud-pubsub.rb +23 -8
  24. metadata +20 -37
  25. data/lib/google/cloud/pubsub/policy.rb +0 -188
  26. data/lib/google/cloud/pubsub/retry_policy.rb +0 -88
  27. data/lib/google/cloud/pubsub/schema/list.rb +0 -180
  28. data/lib/google/cloud/pubsub/schema.rb +0 -310
  29. data/lib/google/cloud/pubsub/snapshot/list.rb +0 -178
  30. data/lib/google/cloud/pubsub/snapshot.rb +0 -205
  31. data/lib/google/cloud/pubsub/subscription/list.rb +0 -205
  32. data/lib/google/cloud/pubsub/subscription/push_config.rb +0 -268
  33. data/lib/google/cloud/pubsub/subscription.rb +0 -1467
  34. data/lib/google/cloud/pubsub/topic/list.rb +0 -171
  35. data/lib/google/cloud/pubsub/topic.rb +0 -1100
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db206c3eab0b2c876feeb00d0e0d8de12b6c6ac60f55153c61f06973f627ac34
4
- data.tar.gz: bed374d87a423c101703159453d1ef6724062b2c6bee7ab58276b715b95d094d
3
+ metadata.gz: a7ddb29c5a0b1ae4716f853f703725e8d8fd0902a978b3ab0141a933b3b4664c
4
+ data.tar.gz: 530004ebcdeac8a4be673a7a40ce7dae3e7771fb8102eb0878336046f7ca6063
5
5
  SHA512:
6
- metadata.gz: 0dbec66b7af6c93d4493ddbfc8b918a661dac41aa5bfb94330169652e2da6e62682c4b22bc969f061e111950babbf7aa786bcf29305aa91f7a85438389adb87d
7
- data.tar.gz: 0c8b9aba5a2c7ed59ed2cda8696db84e253e074468dc48a337a5992e4a695e3c40c87f023872db49565eaac4cc00fa5b0ec55db90839fd5a877fab8a38f334ce
6
+ metadata.gz: cd222027aab9e9b54f90bac0f1a6aa2269129da691bdea4f620c7133c15f003241a1f118ea8ae4fbb52f21fcbb1cbcfa0c2cabae1e26c330df61507a84316c14
7
+ data.tar.gz: 2d386aea9fe41bb823653d594c6073342187c4fa9ba4651daaf30ea5c45050bdef08f84451c82efc5894ab2471b91db06f315de4276ebad6f1a23c942d965331
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,71 @@
1
1
  # Release History
2
2
 
3
+ ### 3.0.3 (2025-11-04)
4
+
5
+ #### Documentation
6
+
7
+ * add warning about loading unvalidated credentials ([#32121](https://github.com/googleapis/google-cloud-ruby/issues/32121))
8
+
9
+ ### 3.0.2 (2025-08-12)
10
+
11
+ #### Bug Fixes
12
+
13
+ * Initialize topic_admin by default for the IAM client ([#30780](https://github.com/googleapis/google-cloud-ruby/issues/30780))
14
+ #### Documentation
15
+
16
+ * Fix subscriber snippet in OVERVIEW.md ([#30813](https://github.com/googleapis/google-cloud-ruby/issues/30813))
17
+
18
+ ### 3.0.1 (2025-08-07)
19
+
20
+ #### Documentation
21
+
22
+ * Update README.md to v3.x ([#30751](https://github.com/googleapis/google-cloud-ruby/issues/30751))
23
+
24
+ ### 3.0.0 (2025-07-29)
25
+
26
+ ### ⚠ BREAKING CHANGES
27
+
28
+ * 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.
29
+ * Rename Topic and Subscription to Publisher and Subscriber, which now serve as dedicated objects for sending and receiving messages.
30
+ * Remove Policy and RetryPolicy in favor of auto-generated counterparts ([#30725](https://github.com/googleapis/google-cloud-ruby/issues/30725))
31
+ * Removal of legacy settings and parameters (e.g. use_legacy_flow_control, project, keyfile)
32
+
33
+ #### Features
34
+
35
+ * 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.
36
+ * Rename Topic and Subscription to Publisher and Subscriber, which now serve as dedicated objects for sending and receiving messages.
37
+ * Introduce path helper methods for accessing resources
38
+ * Removal of legacy settings and parameters (e.g. use_legacy_flow_control, project, keyfile)
39
+ * Remove Policy and RetryPolicy in favor of auto-generated counterparts ([#30725](https://github.com/googleapis/google-cloud-ruby/issues/30725))
40
+ * Change default number of concurrent streams to 1 ([#30742](https://github.com/googleapis/google-cloud-ruby/issues/30742))
41
+
42
+ ### 2.23.0 (2025-07-08)
43
+
44
+ #### Features
45
+
46
+ * Update minimum Ruby version to 3.1 ([#30587](https://github.com/googleapis/google-cloud-ruby/issues/30587))
47
+ #### Bug Fixes
48
+
49
+ * Update google-cloud-pubsub-v1 dependency ([#30591](https://github.com/googleapis/google-cloud-ruby/issues/30591))
50
+
51
+ ### 2.22.0 (2025-03-27)
52
+
53
+ #### Features
54
+
55
+ * Support list schema revisions ([#29174](https://github.com/googleapis/google-cloud-ruby/issues/29174))
56
+
57
+ ### 2.21.0 (2025-03-14)
58
+
59
+ #### Features
60
+
61
+ * Support revision_id in Schema
62
+
63
+ ### 2.20.0 (2025-02-13)
64
+
65
+ #### Features
66
+
67
+ * Update Ruby version requirement to 3.0 ([#29071](https://github.com/googleapis/google-cloud-ruby/issues/29071))
68
+
3
69
  ### 2.19.0 (2024-07-09)
4
70
 
5
71
  #### Features