google-cloud-pubsub 2.15.5 → 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 (38) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +12 -1
  3. data/CHANGELOG.md +129 -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/convert.rb +1 -1
  9. data/lib/google/cloud/pubsub/errors.rb +3 -3
  10. data/lib/google/cloud/pubsub/flow_controller.rb +0 -2
  11. data/lib/google/cloud/pubsub/internal_logger.rb +76 -0
  12. data/lib/google/cloud/pubsub/message.rb +10 -11
  13. data/lib/google/cloud/pubsub/{subscriber → message_listener}/enumerator_queue.rb +1 -1
  14. data/lib/google/cloud/pubsub/{subscriber → message_listener}/inventory.rb +13 -10
  15. data/lib/google/cloud/pubsub/{subscriber → message_listener}/sequencer.rb +1 -1
  16. data/lib/google/cloud/pubsub/{subscriber → message_listener}/stream.rb +58 -17
  17. data/lib/google/cloud/pubsub/{subscriber → message_listener}/timed_unary_buffer.rb +29 -9
  18. data/lib/google/cloud/pubsub/message_listener.rb +413 -0
  19. data/lib/google/cloud/pubsub/project.rb +108 -523
  20. data/lib/google/cloud/pubsub/publisher.rb +424 -0
  21. data/lib/google/cloud/pubsub/received_message.rb +50 -45
  22. data/lib/google/cloud/pubsub/service.rb +48 -349
  23. data/lib/google/cloud/pubsub/subscriber.rb +442 -279
  24. data/lib/google/cloud/pubsub/version.rb +1 -1
  25. data/lib/google/cloud/pubsub.rb +51 -30
  26. data/lib/google-cloud-pubsub.rb +30 -10
  27. metadata +19 -183
  28. data/lib/google/cloud/pubsub/policy.rb +0 -188
  29. data/lib/google/cloud/pubsub/retry_policy.rb +0 -88
  30. data/lib/google/cloud/pubsub/schema/list.rb +0 -180
  31. data/lib/google/cloud/pubsub/schema.rb +0 -310
  32. data/lib/google/cloud/pubsub/snapshot/list.rb +0 -178
  33. data/lib/google/cloud/pubsub/snapshot.rb +0 -205
  34. data/lib/google/cloud/pubsub/subscription/list.rb +0 -205
  35. data/lib/google/cloud/pubsub/subscription/push_config.rb +0 -268
  36. data/lib/google/cloud/pubsub/subscription.rb +0 -1467
  37. data/lib/google/cloud/pubsub/topic/list.rb +0 -171
  38. data/lib/google/cloud/pubsub/topic.rb +0 -1100
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e2a4108df2f16d93f03bb560375274bb816a5958c8c0ad22ca061943ef40ee24
4
- data.tar.gz: 8efa65c9aed030d0b1832aa8d0aec7ef4e9d8605a427bef6517cf77d9e363d5c
3
+ metadata.gz: 500ef51067933f91a1f6134ba3849fae4159f83d79e3f3dc6d6ef9237006e69e
4
+ data.tar.gz: 32be664ffdeed8864e5be601131fc784805fc82564cd4ca03f355894f7c2f588
5
5
  SHA512:
6
- metadata.gz: 1599c8a8adac4fdde84b5782cfa4f4f8c236528452966496a9fce7343b05076772a6c071f99114d7bb93813d0707975e892c262a30616ed13232ce85dfe1b63d
7
- data.tar.gz: 1c661569d004bfc3abd20e60938cad744faa5b474a8df6a67f0b6c36e6c428744e76703fc25e73d20298372894880a40a963a923e21059cd9f4f5454c4b65c01
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,134 @@
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
+
75
+ ### 2.23.0 (2025-07-08)
76
+
77
+ #### Features
78
+
79
+ * Update minimum Ruby version to 3.1 ([#30587](https://github.com/googleapis/google-cloud-ruby/issues/30587))
80
+ #### Bug Fixes
81
+
82
+ * Update google-cloud-pubsub-v1 dependency ([#30591](https://github.com/googleapis/google-cloud-ruby/issues/30591))
83
+
84
+ ### 2.22.0 (2025-03-27)
85
+
86
+ #### Features
87
+
88
+ * Support list schema revisions ([#29174](https://github.com/googleapis/google-cloud-ruby/issues/29174))
89
+
90
+ ### 2.21.0 (2025-03-14)
91
+
92
+ #### Features
93
+
94
+ * Support revision_id in Schema
95
+
96
+ ### 2.20.0 (2025-02-13)
97
+
98
+ #### Features
99
+
100
+ * Update Ruby version requirement to 3.0 ([#29071](https://github.com/googleapis/google-cloud-ruby/issues/29071))
101
+
102
+ ### 2.19.0 (2024-07-09)
103
+
104
+ #### Features
105
+
106
+ * compatibility with GA releases of underlying versioned clients ([#26361](https://github.com/googleapis/google-cloud-ruby/issues/26361))
107
+
108
+ ### 2.18.1 (2024-06-05)
109
+
110
+ #### Bug Fixes
111
+
112
+ * Added bigdecimal to the gem dependencies ([#26012](https://github.com/googleapis/google-cloud-ruby/issues/26012))
113
+
114
+ ### 2.18.0 (2024-03-26)
115
+
116
+ #### Features
117
+
118
+ * support ingestion_data_source_settings for create_topic ([#25418](https://github.com/googleapis/google-cloud-ruby/issues/25418))
119
+
120
+ ### 2.17.0 (2024-03-07)
121
+
122
+ #### Features
123
+
124
+ * Update minimum supported Ruby version to 2.7 ([#25298](https://github.com/googleapis/google-cloud-ruby/issues/25298))
125
+
126
+ ### 2.16.0 (2024-01-25)
127
+
128
+ #### Features
129
+
130
+ * Support for universe_domain ([#24437](https://github.com/googleapis/google-cloud-ruby/issues/24437))
131
+
3
132
  ### 2.15.5 (2023-11-06)
4
133
 
5
134
  #### Bug Fixes