google-cloud-pubsub 1.1.3 → 1.10.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +122 -0
- data/EMULATOR.md +1 -1
- data/TROUBLESHOOTING.md +2 -8
- data/lib/google/cloud/pubsub/async_publisher.rb +15 -19
- data/lib/google/cloud/pubsub/project.rb +18 -26
- data/lib/google/cloud/pubsub/received_message.rb +38 -0
- data/lib/google/cloud/pubsub/retry_policy.rb +90 -0
- data/lib/google/cloud/pubsub/service.rb +37 -15
- data/lib/google/cloud/pubsub/subscriber/inventory.rb +43 -15
- data/lib/google/cloud/pubsub/subscriber/stream.rb +7 -8
- data/lib/google/cloud/pubsub/subscriber.rb +86 -15
- data/lib/google/cloud/pubsub/subscription/push_config.rb +2 -2
- data/lib/google/cloud/pubsub/subscription.rb +296 -6
- data/lib/google/cloud/pubsub/topic.rb +65 -2
- data/lib/google/cloud/pubsub/v1/credentials.rb +1 -1
- data/lib/google/cloud/pubsub/v1/doc/google/iam/v1/iam_policy.rb +1 -1
- data/lib/google/cloud/pubsub/v1/doc/google/iam/v1/options.rb +1 -1
- data/lib/google/cloud/pubsub/v1/doc/google/iam/v1/policy.rb +1 -1
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/duration.rb +1 -1
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/empty.rb +1 -1
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/field_mask.rb +1 -1
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/timestamp.rb +1 -1
- data/lib/google/cloud/pubsub/v1/doc/google/pubsub/v1/pubsub.rb +168 -79
- data/lib/google/cloud/pubsub/v1/doc/google/type/expr.rb +1 -1
- data/lib/google/cloud/pubsub/v1/publisher_client.rb +175 -33
- data/lib/google/cloud/pubsub/v1/publisher_client_config.json +16 -1
- data/lib/google/cloud/pubsub/v1/subscriber_client.rb +145 -64
- data/lib/google/cloud/pubsub/v1/subscriber_client_config.json +12 -3
- data/lib/google/cloud/pubsub/version.rb +1 -1
- data/lib/google/pubsub/v1/pubsub_pb.rb +20 -0
- data/lib/google/pubsub/v1/pubsub_services_pb.rb +7 -3
- metadata +6 -5
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2020 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -17,6 +17,7 @@ module Google
|
|
17
17
|
module Cloud
|
18
18
|
module PubSub
|
19
19
|
module V1
|
20
|
+
# A policy constraining the storage of messages published to the topic.
|
20
21
|
# @!attribute [rw] allowed_persistence_regions
|
21
22
|
# @return [Array<String>]
|
22
23
|
# A list of IDs of GCP regions where messages that are published to the topic
|
@@ -29,7 +30,7 @@ module Google
|
|
29
30
|
# A topic resource.
|
30
31
|
# @!attribute [rw] name
|
31
32
|
# @return [String]
|
32
|
-
# The name of the topic. It must have the format
|
33
|
+
# Required. The name of the topic. It must have the format
|
33
34
|
# `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
|
34
35
|
# and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
|
35
36
|
# underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
|
@@ -66,7 +67,9 @@ module Google
|
|
66
67
|
# at least one attribute.
|
67
68
|
# @!attribute [rw] attributes
|
68
69
|
# @return [Hash{String => String}]
|
69
|
-
#
|
70
|
+
# Attributes for this message. If this field is empty, the message must
|
71
|
+
# contain non-empty data. This can be used to filter messages on the
|
72
|
+
# subscription.
|
70
73
|
# @!attribute [rw] message_id
|
71
74
|
# @return [String]
|
72
75
|
# ID of this message, assigned by the server when the message is published.
|
@@ -80,10 +83,12 @@ module Google
|
|
80
83
|
# publisher in a `Publish` call.
|
81
84
|
# @!attribute [rw] ordering_key
|
82
85
|
# @return [String]
|
83
|
-
#
|
84
|
-
# If a `Subscription` has `enable_message_ordering` set to `true`,
|
85
|
-
# published with the same `ordering_key` value will be
|
86
|
-
# subscribers in the order in which they are received by the
|
86
|
+
# If non-empty, identifies related messages for which publish order should be
|
87
|
+
# respected. If a `Subscription` has `enable_message_ordering` set to `true`,
|
88
|
+
# messages published with the same non-empty `ordering_key` value will be
|
89
|
+
# delivered to subscribers in the order in which they are received by the
|
90
|
+
# Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest`
|
91
|
+
# must specify the same `ordering_key` value.
|
87
92
|
# <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
|
88
93
|
# API might be changed in backward-incompatible ways and is not recommended
|
89
94
|
# for production use. It is not subject to any SLA or deprecation policy.
|
@@ -92,31 +97,31 @@ module Google
|
|
92
97
|
# Request for the GetTopic method.
|
93
98
|
# @!attribute [rw] topic
|
94
99
|
# @return [String]
|
95
|
-
# The name of the topic to get.
|
100
|
+
# Required. The name of the topic to get.
|
96
101
|
# Format is `projects/{project}/topics/{topic}`.
|
97
102
|
class GetTopicRequest; end
|
98
103
|
|
99
104
|
# Request for the UpdateTopic method.
|
100
105
|
# @!attribute [rw] topic
|
101
106
|
# @return [Google::Cloud::PubSub::V1::Topic]
|
102
|
-
# The updated topic object.
|
107
|
+
# Required. The updated topic object.
|
103
108
|
# @!attribute [rw] update_mask
|
104
109
|
# @return [Google::Protobuf::FieldMask]
|
105
|
-
# Indicates which fields in the provided topic to update. Must be
|
106
|
-
# and non-empty. Note that if `update_mask` contains
|
107
|
-
# "message_storage_policy"
|
108
|
-
#
|
109
|
-
#
|
110
|
+
# Required. Indicates which fields in the provided topic to update. Must be
|
111
|
+
# specified and non-empty. Note that if `update_mask` contains
|
112
|
+
# "message_storage_policy" but the `message_storage_policy` is not set in
|
113
|
+
# the `topic` provided above, then the updated value is determined by the
|
114
|
+
# policy configured at the project or organization level.
|
110
115
|
class UpdateTopicRequest; end
|
111
116
|
|
112
117
|
# Request for the Publish method.
|
113
118
|
# @!attribute [rw] topic
|
114
119
|
# @return [String]
|
115
|
-
# The messages in the request will be published on this topic.
|
120
|
+
# Required. The messages in the request will be published on this topic.
|
116
121
|
# Format is `projects/{project}/topics/{topic}`.
|
117
122
|
# @!attribute [rw] messages
|
118
123
|
# @return [Array<Google::Cloud::PubSub::V1::PubsubMessage>]
|
119
|
-
# The messages to publish.
|
124
|
+
# Required. The messages to publish.
|
120
125
|
class PublishRequest; end
|
121
126
|
|
122
127
|
# Response for the `Publish` method.
|
@@ -130,7 +135,7 @@ module Google
|
|
130
135
|
# Request for the `ListTopics` method.
|
131
136
|
# @!attribute [rw] project
|
132
137
|
# @return [String]
|
133
|
-
# The name of the project in which to list topics.
|
138
|
+
# Required. The name of the project in which to list topics.
|
134
139
|
# Format is `projects/{project-id}`.
|
135
140
|
# @!attribute [rw] page_size
|
136
141
|
# @return [Integer]
|
@@ -155,7 +160,7 @@ module Google
|
|
155
160
|
# Request for the `ListTopicSubscriptions` method.
|
156
161
|
# @!attribute [rw] topic
|
157
162
|
# @return [String]
|
158
|
-
# The name of the topic that subscriptions are attached to.
|
163
|
+
# Required. The name of the topic that subscriptions are attached to.
|
159
164
|
# Format is `projects/{project}/topics/{topic}`.
|
160
165
|
# @!attribute [rw] page_size
|
161
166
|
# @return [Integer]
|
@@ -170,7 +175,7 @@ module Google
|
|
170
175
|
# Response for the `ListTopicSubscriptions` method.
|
171
176
|
# @!attribute [rw] subscriptions
|
172
177
|
# @return [Array<String>]
|
173
|
-
# The names of the
|
178
|
+
# The names of subscriptions attached to the topic specified in the request.
|
174
179
|
# @!attribute [rw] next_page_token
|
175
180
|
# @return [String]
|
176
181
|
# If not empty, indicates that there may be more subscriptions that match
|
@@ -181,7 +186,7 @@ module Google
|
|
181
186
|
# Request for the `ListTopicSnapshots` method.
|
182
187
|
# @!attribute [rw] topic
|
183
188
|
# @return [String]
|
184
|
-
# The name of the topic that snapshots are attached to.
|
189
|
+
# Required. The name of the topic that snapshots are attached to.
|
185
190
|
# Format is `projects/{project}/topics/{topic}`.
|
186
191
|
# @!attribute [rw] page_size
|
187
192
|
# @return [Integer]
|
@@ -207,25 +212,35 @@ module Google
|
|
207
212
|
# Request for the `DeleteTopic` method.
|
208
213
|
# @!attribute [rw] topic
|
209
214
|
# @return [String]
|
210
|
-
# Name of the topic to delete.
|
215
|
+
# Required. Name of the topic to delete.
|
211
216
|
# Format is `projects/{project}/topics/{topic}`.
|
212
217
|
class DeleteTopicRequest; end
|
213
218
|
|
219
|
+
# Request for the DetachSubscription method.
|
220
|
+
# @!attribute [rw] subscription
|
221
|
+
# @return [String]
|
222
|
+
# Required. The subscription to detach.
|
223
|
+
# Format is `projects/{project}/subscriptions/{subscription}`.
|
224
|
+
class DetachSubscriptionRequest; end
|
225
|
+
|
226
|
+
# Response for the DetachSubscription method.
|
227
|
+
# Reserved for future use.
|
228
|
+
class DetachSubscriptionResponse; end
|
229
|
+
|
214
230
|
# A subscription resource.
|
215
231
|
# @!attribute [rw] name
|
216
232
|
# @return [String]
|
217
|
-
# The name of the subscription. It must have the format
|
233
|
+
# Required. The name of the subscription. It must have the format
|
218
234
|
# `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
|
219
235
|
# start with a letter, and contain only letters (`[A-Za-z]`), numbers
|
220
236
|
# (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
|
221
237
|
# plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
|
222
|
-
# in length, and it must not start with `"goog"
|
238
|
+
# in length, and it must not start with `"goog"`.
|
223
239
|
# @!attribute [rw] topic
|
224
240
|
# @return [String]
|
225
|
-
# The name of the topic from which this subscription is receiving
|
226
|
-
# Format is `projects/{project}/topics/{topic}`.
|
227
|
-
#
|
228
|
-
# deleted.
|
241
|
+
# Required. The name of the topic from which this subscription is receiving
|
242
|
+
# messages. Format is `projects/{project}/topics/{topic}`. The value of this
|
243
|
+
# field will be `_deleted-topic_` if the topic has been deleted.
|
229
244
|
# @!attribute [rw] push_config
|
230
245
|
# @return [Google::Cloud::PubSub::V1::PushConfig]
|
231
246
|
# If push delivery is used with this subscription, this field is
|
@@ -291,6 +306,13 @@ module Google
|
|
291
306
|
# operations on the subscription. If `expiration_policy` is not set, a
|
292
307
|
# *default policy* with `ttl` of 31 days will be used. The minimum allowed
|
293
308
|
# value for `expiration_policy.ttl` is 1 day.
|
309
|
+
# @!attribute [rw] filter
|
310
|
+
# @return [String]
|
311
|
+
# An expression written in the Pub/Sub [filter
|
312
|
+
# language](https://cloud.google.com/pubsub/docs/filtering). If non-empty,
|
313
|
+
# then only `PubsubMessage`s whose `attributes` field matches the filter are
|
314
|
+
# delivered on this subscription. If empty, then no messages are filtered
|
315
|
+
# out.
|
294
316
|
# @!attribute [rw] dead_letter_policy
|
295
317
|
# @return [Google::Cloud::PubSub::V1::DeadLetterPolicy]
|
296
318
|
# A policy that specifies the conditions for dead lettering messages in
|
@@ -301,11 +323,45 @@ module Google
|
|
301
323
|
# parent project (i.e.,
|
302
324
|
# service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
|
303
325
|
# permission to Acknowledge() messages on this subscription.
|
304
|
-
#
|
305
|
-
#
|
306
|
-
#
|
326
|
+
# @!attribute [rw] retry_policy
|
327
|
+
# @return [Google::Cloud::PubSub::V1::RetryPolicy]
|
328
|
+
# A policy that specifies how Pub/Sub retries message delivery for this
|
329
|
+
# subscription.
|
330
|
+
#
|
331
|
+
# If not set, the default retry policy is applied. This generally implies
|
332
|
+
# that messages will be retried as soon as possible for healthy subscribers.
|
333
|
+
# RetryPolicy will be triggered on NACKs or acknowledgement deadline
|
334
|
+
# exceeded events for a given message.
|
335
|
+
# @!attribute [rw] detached
|
336
|
+
# @return [true, false]
|
337
|
+
# Indicates whether the subscription is detached from its topic. Detached
|
338
|
+
# subscriptions don't receive messages from their topic and don't retain any
|
339
|
+
# backlog. `Pull` and `StreamingPull` requests will return
|
340
|
+
# FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
|
341
|
+
# the endpoint will not be made.
|
307
342
|
class Subscription; end
|
308
343
|
|
344
|
+
# A policy that specifies how Cloud Pub/Sub retries message delivery.
|
345
|
+
#
|
346
|
+
# Retry delay will be exponential based on provided minimum and maximum
|
347
|
+
# backoffs. https://en.wikipedia.org/wiki/Exponential_backoff.
|
348
|
+
#
|
349
|
+
# RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded
|
350
|
+
# events for a given message.
|
351
|
+
#
|
352
|
+
# Retry Policy is implemented on a best effort basis. At times, the delay
|
353
|
+
# between consecutive deliveries may not match the configuration. That is,
|
354
|
+
# delay can be more or less than configured backoff.
|
355
|
+
# @!attribute [rw] minimum_backoff
|
356
|
+
# @return [Google::Protobuf::Duration]
|
357
|
+
# The minimum delay between consecutive deliveries of a given message.
|
358
|
+
# Value should be between 0 and 600 seconds. Defaults to 10 seconds.
|
359
|
+
# @!attribute [rw] maximum_backoff
|
360
|
+
# @return [Google::Protobuf::Duration]
|
361
|
+
# The maximum delay between consecutive deliveries of a given message.
|
362
|
+
# Value should be between 0 and 600 seconds. Defaults to 600 seconds.
|
363
|
+
class RetryPolicy; end
|
364
|
+
|
309
365
|
# Dead lettering is done on a best effort basis. The same message might be
|
310
366
|
# dead lettered multiple times.
|
311
367
|
#
|
@@ -355,7 +411,7 @@ module Google
|
|
355
411
|
# @!attribute [rw] push_endpoint
|
356
412
|
# @return [String]
|
357
413
|
# A URL locating the endpoint to which messages should be pushed.
|
358
|
-
# For example, a Webhook endpoint might use
|
414
|
+
# For example, a Webhook endpoint might use `https://example.com/push`.
|
359
415
|
# @!attribute [rw] attributes
|
360
416
|
# @return [Hash{String => String}]
|
361
417
|
# Endpoint configuration attributes that can be used to control different
|
@@ -414,8 +470,11 @@ module Google
|
|
414
470
|
# The message.
|
415
471
|
# @!attribute [rw] delivery_attempt
|
416
472
|
# @return [Integer]
|
417
|
-
#
|
418
|
-
#
|
473
|
+
# The approximate number of times that Cloud Pub/Sub has attempted to deliver
|
474
|
+
# the associated message to a subscriber.
|
475
|
+
#
|
476
|
+
# More precisely, this is 1 + (number of NACKs) +
|
477
|
+
# (number of ack_deadline exceeds) for this message.
|
419
478
|
#
|
420
479
|
# A NACK is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline
|
421
480
|
# exceeds event is whenever a message is not acknowledged within
|
@@ -423,36 +482,33 @@ module Google
|
|
423
482
|
# Subscription.ackDeadlineSeconds, but may get extended automatically by
|
424
483
|
# the client library.
|
425
484
|
#
|
426
|
-
#
|
427
|
-
# is calculated at best effort and is approximate.
|
485
|
+
# Upon the first delivery of a given message, `delivery_attempt` will have a
|
486
|
+
# value of 1. The value is calculated at best effort and is approximate.
|
428
487
|
#
|
429
488
|
# If a DeadLetterPolicy is not set on the subscription, this will be 0.
|
430
|
-
# <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
|
431
|
-
# API might be changed in backward-incompatible ways and is not recommended
|
432
|
-
# for production use. It is not subject to any SLA or deprecation policy.
|
433
489
|
class ReceivedMessage; end
|
434
490
|
|
435
491
|
# Request for the GetSubscription method.
|
436
492
|
# @!attribute [rw] subscription
|
437
493
|
# @return [String]
|
438
|
-
# The name of the subscription to get.
|
494
|
+
# Required. The name of the subscription to get.
|
439
495
|
# Format is `projects/{project}/subscriptions/{sub}`.
|
440
496
|
class GetSubscriptionRequest; end
|
441
497
|
|
442
498
|
# Request for the UpdateSubscription method.
|
443
499
|
# @!attribute [rw] subscription
|
444
500
|
# @return [Google::Cloud::PubSub::V1::Subscription]
|
445
|
-
# The updated subscription object.
|
501
|
+
# Required. The updated subscription object.
|
446
502
|
# @!attribute [rw] update_mask
|
447
503
|
# @return [Google::Protobuf::FieldMask]
|
448
|
-
# Indicates which fields in the provided subscription to update.
|
504
|
+
# Required. Indicates which fields in the provided subscription to update.
|
449
505
|
# Must be specified and non-empty.
|
450
506
|
class UpdateSubscriptionRequest; end
|
451
507
|
|
452
508
|
# Request for the `ListSubscriptions` method.
|
453
509
|
# @!attribute [rw] project
|
454
510
|
# @return [String]
|
455
|
-
# The name of the project in which to list subscriptions.
|
511
|
+
# Required. The name of the project in which to list subscriptions.
|
456
512
|
# Format is `projects/{project-id}`.
|
457
513
|
# @!attribute [rw] page_size
|
458
514
|
# @return [Integer]
|
@@ -478,18 +534,18 @@ module Google
|
|
478
534
|
# Request for the DeleteSubscription method.
|
479
535
|
# @!attribute [rw] subscription
|
480
536
|
# @return [String]
|
481
|
-
# The subscription to delete.
|
537
|
+
# Required. The subscription to delete.
|
482
538
|
# Format is `projects/{project}/subscriptions/{sub}`.
|
483
539
|
class DeleteSubscriptionRequest; end
|
484
540
|
|
485
541
|
# Request for the ModifyPushConfig method.
|
486
542
|
# @!attribute [rw] subscription
|
487
543
|
# @return [String]
|
488
|
-
# The name of the subscription.
|
544
|
+
# Required. The name of the subscription.
|
489
545
|
# Format is `projects/{project}/subscriptions/{sub}`.
|
490
546
|
# @!attribute [rw] push_config
|
491
547
|
# @return [Google::Cloud::PubSub::V1::PushConfig]
|
492
|
-
# The push configuration for future deliveries.
|
548
|
+
# Required. The push configuration for future deliveries.
|
493
549
|
#
|
494
550
|
# An empty `pushConfig` indicates that the Pub/Sub system should
|
495
551
|
# stop pushing messages from the given subscription and allow
|
@@ -500,18 +556,21 @@ module Google
|
|
500
556
|
# Request for the `Pull` method.
|
501
557
|
# @!attribute [rw] subscription
|
502
558
|
# @return [String]
|
503
|
-
# The subscription from which messages should be pulled.
|
559
|
+
# Required. The subscription from which messages should be pulled.
|
504
560
|
# Format is `projects/{project}/subscriptions/{sub}`.
|
505
561
|
# @!attribute [rw] return_immediately
|
506
562
|
# @return [true, false]
|
507
|
-
# If this field set to true, the system will respond immediately
|
508
|
-
# it there are no messages available to return in the `Pull`
|
509
|
-
# Otherwise, the system may wait (for a bounded amount of time)
|
510
|
-
# least one message is available, rather than returning no messages.
|
563
|
+
# Optional. If this field set to true, the system will respond immediately
|
564
|
+
# even if it there are no messages available to return in the `Pull`
|
565
|
+
# response. Otherwise, the system may wait (for a bounded amount of time)
|
566
|
+
# until at least one message is available, rather than returning no messages.
|
567
|
+
# Warning: setting this field to `true` is discouraged because it adversely
|
568
|
+
# impacts the performance of `Pull` operations. We recommend that users do
|
569
|
+
# not set this field.
|
511
570
|
# @!attribute [rw] max_messages
|
512
571
|
# @return [Integer]
|
513
|
-
# The maximum number of messages to return for this request. Must
|
514
|
-
# positive integer. The Pub/Sub system may return fewer than the number
|
572
|
+
# Required. The maximum number of messages to return for this request. Must
|
573
|
+
# be a positive integer. The Pub/Sub system may return fewer than the number
|
515
574
|
# specified.
|
516
575
|
class PullRequest; end
|
517
576
|
|
@@ -527,17 +586,17 @@ module Google
|
|
527
586
|
# Request for the ModifyAckDeadline method.
|
528
587
|
# @!attribute [rw] subscription
|
529
588
|
# @return [String]
|
530
|
-
# The name of the subscription.
|
589
|
+
# Required. The name of the subscription.
|
531
590
|
# Format is `projects/{project}/subscriptions/{sub}`.
|
532
591
|
# @!attribute [rw] ack_ids
|
533
592
|
# @return [Array<String>]
|
534
|
-
# List of acknowledgment IDs.
|
593
|
+
# Required. List of acknowledgment IDs.
|
535
594
|
# @!attribute [rw] ack_deadline_seconds
|
536
595
|
# @return [Integer]
|
537
|
-
# The new ack deadline with respect to the time this request was
|
538
|
-
# the Pub/Sub system. For example, if the value is 10, the new
|
539
|
-
#
|
540
|
-
#
|
596
|
+
# Required. The new ack deadline with respect to the time this request was
|
597
|
+
# sent to the Pub/Sub system. For example, if the value is 10, the new ack
|
598
|
+
# deadline will expire 10 seconds after the `ModifyAckDeadline` call was
|
599
|
+
# made. Specifying zero might immediately make the message available for
|
541
600
|
# delivery to another subscriber client. This typically results in an
|
542
601
|
# increase in the rate of message redeliveries (that is, duplicates).
|
543
602
|
# The minimum deadline you can specify is 0 seconds.
|
@@ -547,12 +606,13 @@ module Google
|
|
547
606
|
# Request for the Acknowledge method.
|
548
607
|
# @!attribute [rw] subscription
|
549
608
|
# @return [String]
|
550
|
-
# The subscription whose message is being acknowledged.
|
609
|
+
# Required. The subscription whose message is being acknowledged.
|
551
610
|
# Format is `projects/{project}/subscriptions/{sub}`.
|
552
611
|
# @!attribute [rw] ack_ids
|
553
612
|
# @return [Array<String>]
|
554
|
-
# The acknowledgment ID for the messages being acknowledged that
|
555
|
-
# by the Pub/Sub system in the `Pull` response. Must not be
|
613
|
+
# Required. The acknowledgment ID for the messages being acknowledged that
|
614
|
+
# was returned by the Pub/Sub system in the `Pull` response. Must not be
|
615
|
+
# empty.
|
556
616
|
class AcknowledgeRequest; end
|
557
617
|
|
558
618
|
# Request for the `StreamingPull` streaming RPC method. This request is used to
|
@@ -560,8 +620,8 @@ module Google
|
|
560
620
|
# deadline modifications from the client to the server.
|
561
621
|
# @!attribute [rw] subscription
|
562
622
|
# @return [String]
|
563
|
-
# The subscription for which to initialize the new stream. This
|
564
|
-
# provided in the first request on the stream, and must not be set in
|
623
|
+
# Required. The subscription for which to initialize the new stream. This
|
624
|
+
# must be provided in the first request on the stream, and must not be set in
|
565
625
|
# subsequent requests from client to server.
|
566
626
|
# Format is `projects/{project}/subscriptions/{sub}`.
|
567
627
|
# @!attribute [rw] ack_ids
|
@@ -593,10 +653,40 @@ module Google
|
|
593
653
|
# processing was interrupted.
|
594
654
|
# @!attribute [rw] stream_ack_deadline_seconds
|
595
655
|
# @return [Integer]
|
596
|
-
# The ack deadline to use for the stream. This must be provided in
|
597
|
-
# first request on the stream, but it can also be updated on subsequent
|
656
|
+
# Required. The ack deadline to use for the stream. This must be provided in
|
657
|
+
# the first request on the stream, but it can also be updated on subsequent
|
598
658
|
# requests from client to server. The minimum deadline you can specify is 10
|
599
659
|
# seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
|
660
|
+
# @!attribute [rw] client_id
|
661
|
+
# @return [String]
|
662
|
+
# A unique identifier that is used to distinguish client instances from each
|
663
|
+
# other. Only needs to be provided on the initial request. When a stream
|
664
|
+
# disconnects and reconnects for the same stream, the client_id should be set
|
665
|
+
# to the same value so that state associated with the old stream can be
|
666
|
+
# transferred to the new stream. The same client_id should not be used for
|
667
|
+
# different client instances.
|
668
|
+
# @!attribute [rw] max_outstanding_messages
|
669
|
+
# @return [Integer]
|
670
|
+
# Flow control settings for the maximum number of outstanding messages. When
|
671
|
+
# there are `max_outstanding_messages` or more currently sent to the
|
672
|
+
# streaming pull client that have not yet been acked or nacked, the server
|
673
|
+
# stops sending more messages. The sending of messages resumes once the
|
674
|
+
# number of outstanding messages is less than this value. If the value is
|
675
|
+
# <= 0, there is no limit to the number of outstanding messages. This
|
676
|
+
# property can only be set on the initial StreamingPullRequest. If it is set
|
677
|
+
# on a subsequent request, the stream will be aborted with status
|
678
|
+
# `INVALID_ARGUMENT`.
|
679
|
+
# @!attribute [rw] max_outstanding_bytes
|
680
|
+
# @return [Integer]
|
681
|
+
# Flow control settings for the maximum number of outstanding bytes. When
|
682
|
+
# there are `max_outstanding_bytes` or more worth of messages currently sent
|
683
|
+
# to the streaming pull client that have not yet been acked or nacked, the
|
684
|
+
# server will stop sending more messages. The sending of messages resumes
|
685
|
+
# once the number of outstanding bytes is less than this value. If the value
|
686
|
+
# is <= 0, there is no limit to the number of outstanding bytes. This
|
687
|
+
# property can only be set on the initial StreamingPullRequest. If it is set
|
688
|
+
# on a subsequent request, the stream will be aborted with status
|
689
|
+
# `INVALID_ARGUMENT`.
|
600
690
|
class StreamingPullRequest; end
|
601
691
|
|
602
692
|
# Response for the `StreamingPull` method. This response is used to stream
|
@@ -609,16 +699,15 @@ module Google
|
|
609
699
|
# Request for the `CreateSnapshot` method.
|
610
700
|
# @!attribute [rw] name
|
611
701
|
# @return [String]
|
612
|
-
#
|
613
|
-
#
|
614
|
-
#
|
615
|
-
#
|
616
|
-
#
|
617
|
-
#
|
618
|
-
# Format is `projects/{project}/snapshots/{snap}`.
|
702
|
+
# Required. User-provided name for this snapshot. If the name is not provided
|
703
|
+
# in the request, the server will assign a random name for this snapshot on
|
704
|
+
# the same project as the subscription. Note that for REST API requests, you
|
705
|
+
# must specify a name. See the <a
|
706
|
+
# href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource
|
707
|
+
# name rules</a>. Format is `projects/{project}/snapshots/{snap}`.
|
619
708
|
# @!attribute [rw] subscription
|
620
709
|
# @return [String]
|
621
|
-
# The subscription whose backlog the snapshot retains.
|
710
|
+
# Required. The subscription whose backlog the snapshot retains.
|
622
711
|
# Specifically, the created snapshot is guaranteed to retain:
|
623
712
|
# (a) The existing backlog on the subscription. More precisely, this is
|
624
713
|
# defined as the messages in the subscription's backlog that are
|
@@ -636,10 +725,10 @@ module Google
|
|
636
725
|
# Request for the UpdateSnapshot method.
|
637
726
|
# @!attribute [rw] snapshot
|
638
727
|
# @return [Google::Cloud::PubSub::V1::Snapshot]
|
639
|
-
# The updated snapshot object.
|
728
|
+
# Required. The updated snapshot object.
|
640
729
|
# @!attribute [rw] update_mask
|
641
730
|
# @return [Google::Protobuf::FieldMask]
|
642
|
-
# Indicates which fields in the provided snapshot to update.
|
731
|
+
# Required. Indicates which fields in the provided snapshot to update.
|
643
732
|
# Must be specified and non-empty.
|
644
733
|
class UpdateSnapshotRequest; end
|
645
734
|
|
@@ -676,14 +765,14 @@ module Google
|
|
676
765
|
# Request for the GetSnapshot method.
|
677
766
|
# @!attribute [rw] snapshot
|
678
767
|
# @return [String]
|
679
|
-
# The name of the snapshot to get.
|
768
|
+
# Required. The name of the snapshot to get.
|
680
769
|
# Format is `projects/{project}/snapshots/{snap}`.
|
681
770
|
class GetSnapshotRequest; end
|
682
771
|
|
683
772
|
# Request for the `ListSnapshots` method.
|
684
773
|
# @!attribute [rw] project
|
685
774
|
# @return [String]
|
686
|
-
# The name of the project in which to list snapshots.
|
775
|
+
# Required. The name of the project in which to list snapshots.
|
687
776
|
# Format is `projects/{project-id}`.
|
688
777
|
# @!attribute [rw] page_size
|
689
778
|
# @return [Integer]
|
@@ -708,14 +797,14 @@ module Google
|
|
708
797
|
# Request for the `DeleteSnapshot` method.
|
709
798
|
# @!attribute [rw] snapshot
|
710
799
|
# @return [String]
|
711
|
-
# The name of the snapshot to delete.
|
800
|
+
# Required. The name of the snapshot to delete.
|
712
801
|
# Format is `projects/{project}/snapshots/{snap}`.
|
713
802
|
class DeleteSnapshotRequest; end
|
714
803
|
|
715
804
|
# Request for the `Seek` method.
|
716
805
|
# @!attribute [rw] subscription
|
717
806
|
# @return [String]
|
718
|
-
# The subscription to affect.
|
807
|
+
# Required. The subscription to affect.
|
719
808
|
# @!attribute [rw] time
|
720
809
|
# @return [Google::Protobuf::Timestamp]
|
721
810
|
# The time to seek to.
|