google-cloud-pubsub 0.26.0 → 2.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.yardopts +12 -2
- data/AUTHENTICATION.md +178 -0
- data/CHANGELOG.md +659 -0
- data/CODE_OF_CONDUCT.md +40 -0
- data/CONTRIBUTING.md +187 -0
- data/EMULATOR.md +37 -0
- data/LICENSE +2 -2
- data/LOGGING.md +32 -0
- data/OVERVIEW.md +528 -0
- data/TROUBLESHOOTING.md +31 -0
- data/lib/google/cloud/pubsub/async_publisher/batch.rb +310 -0
- data/lib/google/cloud/pubsub/async_publisher.rb +402 -0
- data/lib/google/cloud/pubsub/batch_publisher.rb +100 -0
- data/lib/google/cloud/pubsub/convert.rb +91 -0
- data/lib/google/cloud/pubsub/credentials.rb +26 -10
- data/lib/google/cloud/pubsub/errors.rb +85 -0
- data/lib/google/cloud/pubsub/message.rb +80 -17
- data/lib/google/cloud/pubsub/policy.rb +17 -14
- data/lib/google/cloud/pubsub/project.rb +364 -250
- data/lib/google/cloud/pubsub/publish_result.rb +103 -0
- data/lib/google/cloud/pubsub/received_message.rb +162 -24
- data/lib/google/cloud/pubsub/retry_policy.rb +88 -0
- data/lib/google/cloud/pubsub/schema/list.rb +180 -0
- data/lib/google/cloud/pubsub/schema.rb +310 -0
- data/lib/google/cloud/pubsub/service.rb +281 -265
- data/lib/google/cloud/pubsub/snapshot/list.rb +21 -21
- data/lib/google/cloud/pubsub/snapshot.rb +55 -15
- data/lib/google/cloud/pubsub/subscriber/enumerator_queue.rb +54 -0
- data/lib/google/cloud/pubsub/subscriber/inventory.rb +173 -0
- data/lib/google/cloud/pubsub/subscriber/sequencer.rb +115 -0
- data/lib/google/cloud/pubsub/subscriber/stream.rb +400 -0
- data/lib/google/cloud/pubsub/subscriber/timed_unary_buffer.rb +230 -0
- data/lib/google/cloud/pubsub/subscriber.rb +417 -0
- data/lib/google/cloud/pubsub/subscription/list.rb +28 -28
- data/lib/google/cloud/pubsub/subscription/push_config.rb +268 -0
- data/lib/google/cloud/pubsub/subscription.rb +900 -172
- data/lib/google/cloud/pubsub/topic/list.rb +21 -21
- data/lib/google/cloud/pubsub/topic.rb +674 -95
- data/lib/google/cloud/pubsub/version.rb +6 -4
- data/lib/google/cloud/pubsub.rb +104 -439
- data/lib/google-cloud-pubsub.rb +60 -29
- metadata +88 -50
- data/README.md +0 -69
- data/lib/google/cloud/pubsub/topic/publisher.rb +0 -86
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/duration.rb +0 -77
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/field_mask.rb +0 -223
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/timestamp.rb +0 -81
- data/lib/google/cloud/pubsub/v1/doc/google/pubsub/v1/pubsub.rb +0 -503
- data/lib/google/cloud/pubsub/v1/publisher_client.rb +0 -605
- data/lib/google/cloud/pubsub/v1/publisher_client_config.json +0 -96
- data/lib/google/cloud/pubsub/v1/subscriber_client.rb +0 -1104
- data/lib/google/cloud/pubsub/v1/subscriber_client_config.json +0 -127
- data/lib/google/cloud/pubsub/v1.rb +0 -17
- data/lib/google/pubsub/v1/pubsub_pb.rb +0 -187
- data/lib/google/pubsub/v1/pubsub_services_pb.rb +0 -159
@@ -1,503 +0,0 @@
|
|
1
|
-
# Copyright 2017, Google Inc. All rights reserved.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
module Google
|
16
|
-
module Pubsub
|
17
|
-
module V1
|
18
|
-
# A topic resource.
|
19
|
-
# @!attribute [rw] name
|
20
|
-
# @return [String]
|
21
|
-
# The name of the topic. It must have the format
|
22
|
-
# +"projects/{project}/topics/{topic}"+. +{topic}+ must start with a letter,
|
23
|
-
# and contain only letters (+[A-Za-z]+), numbers (+[0-9]+), dashes (+-+),
|
24
|
-
# underscores (+_+), periods (+.+), tildes (+~+), plus (+++) or percent
|
25
|
-
# signs (+%+). It must be between 3 and 255 characters in length, and it
|
26
|
-
# must not start with +"goog"+.
|
27
|
-
class Topic; end
|
28
|
-
|
29
|
-
# A message data and its attributes. The message payload must not be empty;
|
30
|
-
# it must contain either a non-empty data field, or at least one attribute.
|
31
|
-
# @!attribute [rw] data
|
32
|
-
# @return [String]
|
33
|
-
# The message payload.
|
34
|
-
# @!attribute [rw] attributes
|
35
|
-
# @return [Hash{String => String}]
|
36
|
-
# Optional attributes for this message.
|
37
|
-
# @!attribute [rw] message_id
|
38
|
-
# @return [String]
|
39
|
-
# ID of this message, assigned by the server when the message is published.
|
40
|
-
# Guaranteed to be unique within the topic. This value may be read by a
|
41
|
-
# subscriber that receives a +PubsubMessage+ via a +Pull+ call or a push
|
42
|
-
# delivery. It must not be populated by the publisher in a +Publish+ call.
|
43
|
-
# @!attribute [rw] publish_time
|
44
|
-
# @return [Google::Protobuf::Timestamp]
|
45
|
-
# The time at which the message was published, populated by the server when
|
46
|
-
# it receives the +Publish+ call. It must not be populated by the
|
47
|
-
# publisher in a +Publish+ call.
|
48
|
-
class PubsubMessage; end
|
49
|
-
|
50
|
-
# Request for the GetTopic method.
|
51
|
-
# @!attribute [rw] topic
|
52
|
-
# @return [String]
|
53
|
-
# The name of the topic to get.
|
54
|
-
# Format is +projects/{project}/topics/{topic}+.
|
55
|
-
class GetTopicRequest; end
|
56
|
-
|
57
|
-
# Request for the Publish method.
|
58
|
-
# @!attribute [rw] topic
|
59
|
-
# @return [String]
|
60
|
-
# The messages in the request will be published on this topic.
|
61
|
-
# Format is +projects/{project}/topics/{topic}+.
|
62
|
-
# @!attribute [rw] messages
|
63
|
-
# @return [Array<Google::Pubsub::V1::PubsubMessage>]
|
64
|
-
# The messages to publish.
|
65
|
-
class PublishRequest; end
|
66
|
-
|
67
|
-
# Response for the +Publish+ method.
|
68
|
-
# @!attribute [rw] message_ids
|
69
|
-
# @return [Array<String>]
|
70
|
-
# The server-assigned ID of each published message, in the same order as
|
71
|
-
# the messages in the request. IDs are guaranteed to be unique within
|
72
|
-
# the topic.
|
73
|
-
class PublishResponse; end
|
74
|
-
|
75
|
-
# Request for the +ListTopics+ method.
|
76
|
-
# @!attribute [rw] project
|
77
|
-
# @return [String]
|
78
|
-
# The name of the cloud project that topics belong to.
|
79
|
-
# Format is +projects/{project}+.
|
80
|
-
# @!attribute [rw] page_size
|
81
|
-
# @return [Integer]
|
82
|
-
# Maximum number of topics to return.
|
83
|
-
# @!attribute [rw] page_token
|
84
|
-
# @return [String]
|
85
|
-
# The value returned by the last +ListTopicsResponse+; indicates that this is
|
86
|
-
# a continuation of a prior +ListTopics+ call, and that the system should
|
87
|
-
# return the next page of data.
|
88
|
-
class ListTopicsRequest; end
|
89
|
-
|
90
|
-
# Response for the +ListTopics+ method.
|
91
|
-
# @!attribute [rw] topics
|
92
|
-
# @return [Array<Google::Pubsub::V1::Topic>]
|
93
|
-
# The resulting topics.
|
94
|
-
# @!attribute [rw] next_page_token
|
95
|
-
# @return [String]
|
96
|
-
# If not empty, indicates that there may be more topics that match the
|
97
|
-
# request; this value should be passed in a new +ListTopicsRequest+.
|
98
|
-
class ListTopicsResponse; end
|
99
|
-
|
100
|
-
# Request for the +ListTopicSubscriptions+ method.
|
101
|
-
# @!attribute [rw] topic
|
102
|
-
# @return [String]
|
103
|
-
# The name of the topic that subscriptions are attached to.
|
104
|
-
# Format is +projects/{project}/topics/{topic}+.
|
105
|
-
# @!attribute [rw] page_size
|
106
|
-
# @return [Integer]
|
107
|
-
# Maximum number of subscription names to return.
|
108
|
-
# @!attribute [rw] page_token
|
109
|
-
# @return [String]
|
110
|
-
# The value returned by the last +ListTopicSubscriptionsResponse+; indicates
|
111
|
-
# that this is a continuation of a prior +ListTopicSubscriptions+ call, and
|
112
|
-
# that the system should return the next page of data.
|
113
|
-
class ListTopicSubscriptionsRequest; end
|
114
|
-
|
115
|
-
# Response for the +ListTopicSubscriptions+ method.
|
116
|
-
# @!attribute [rw] subscriptions
|
117
|
-
# @return [Array<String>]
|
118
|
-
# The names of the subscriptions that match the request.
|
119
|
-
# @!attribute [rw] next_page_token
|
120
|
-
# @return [String]
|
121
|
-
# If not empty, indicates that there may be more subscriptions that match
|
122
|
-
# the request; this value should be passed in a new
|
123
|
-
# +ListTopicSubscriptionsRequest+ to get more subscriptions.
|
124
|
-
class ListTopicSubscriptionsResponse; end
|
125
|
-
|
126
|
-
# Request for the +DeleteTopic+ method.
|
127
|
-
# @!attribute [rw] topic
|
128
|
-
# @return [String]
|
129
|
-
# Name of the topic to delete.
|
130
|
-
# Format is +projects/{project}/topics/{topic}+.
|
131
|
-
class DeleteTopicRequest; end
|
132
|
-
|
133
|
-
# A subscription resource.
|
134
|
-
# @!attribute [rw] name
|
135
|
-
# @return [String]
|
136
|
-
# The name of the subscription. It must have the format
|
137
|
-
# +"projects/{project}/subscriptions/{subscription}"+. +{subscription}+ must
|
138
|
-
# start with a letter, and contain only letters (+[A-Za-z]+), numbers
|
139
|
-
# (+[0-9]+), dashes (+-+), underscores (+_+), periods (+.+), tildes (+~+),
|
140
|
-
# plus (+++) or percent signs (+%+). It must be between 3 and 255 characters
|
141
|
-
# in length, and it must not start with +"goog"+.
|
142
|
-
# @!attribute [rw] topic
|
143
|
-
# @return [String]
|
144
|
-
# The name of the topic from which this subscription is receiving messages.
|
145
|
-
# Format is +projects/{project}/topics/{topic}+.
|
146
|
-
# The value of this field will be +_deleted-topic_+ if the topic has been
|
147
|
-
# deleted.
|
148
|
-
# @!attribute [rw] push_config
|
149
|
-
# @return [Google::Pubsub::V1::PushConfig]
|
150
|
-
# If push delivery is used with this subscription, this field is
|
151
|
-
# used to configure it. An empty +pushConfig+ signifies that the subscriber
|
152
|
-
# will pull and ack messages using API methods.
|
153
|
-
# @!attribute [rw] ack_deadline_seconds
|
154
|
-
# @return [Integer]
|
155
|
-
# This value is the maximum time after a subscriber receives a message
|
156
|
-
# before the subscriber should acknowledge the message. After message
|
157
|
-
# delivery but before the ack deadline expires and before the message is
|
158
|
-
# acknowledged, it is an outstanding message and will not be delivered
|
159
|
-
# again during that time (on a best-effort basis).
|
160
|
-
#
|
161
|
-
# For pull subscriptions, this value is used as the initial value for the ack
|
162
|
-
# deadline. To override this value for a given message, call
|
163
|
-
# +ModifyAckDeadline+ with the corresponding +ack_id+ if using
|
164
|
-
# pull.
|
165
|
-
# The minimum custom deadline you can specify is 10 seconds.
|
166
|
-
# The maximum custom deadline you can specify is 600 seconds (10 minutes).
|
167
|
-
# If this parameter is 0, a default value of 10 seconds is used.
|
168
|
-
#
|
169
|
-
# For push delivery, this value is also used to set the request timeout for
|
170
|
-
# the call to the push endpoint.
|
171
|
-
#
|
172
|
-
# If the subscriber never acknowledges the message, the Pub/Sub
|
173
|
-
# system will eventually redeliver the message.
|
174
|
-
# @!attribute [rw] retain_acked_messages
|
175
|
-
# @return [true, false]
|
176
|
-
# Indicates whether to retain acknowledged messages. If true, then
|
177
|
-
# messages are not expunged from the subscription's backlog, even if they are
|
178
|
-
# acknowledged, until they fall out of the +message_retention_duration+
|
179
|
-
# window.
|
180
|
-
# @!attribute [rw] message_retention_duration
|
181
|
-
# @return [Google::Protobuf::Duration]
|
182
|
-
# How long to retain unacknowledged messages in the subscription's backlog,
|
183
|
-
# from the moment a message is published.
|
184
|
-
# If +retain_acked_messages+ is true, then this also configures the retention
|
185
|
-
# of acknowledged messages, and thus configures how far back in time a +Seek+
|
186
|
-
# can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
|
187
|
-
# minutes.
|
188
|
-
class Subscription; end
|
189
|
-
|
190
|
-
# Configuration for a push delivery endpoint.
|
191
|
-
# @!attribute [rw] push_endpoint
|
192
|
-
# @return [String]
|
193
|
-
# A URL locating the endpoint to which messages should be pushed.
|
194
|
-
# For example, a Webhook endpoint might use "https://example.com/push".
|
195
|
-
# @!attribute [rw] attributes
|
196
|
-
# @return [Hash{String => String}]
|
197
|
-
# Endpoint configuration attributes.
|
198
|
-
#
|
199
|
-
# Every endpoint has a set of API supported attributes that can be used to
|
200
|
-
# control different aspects of the message delivery.
|
201
|
-
#
|
202
|
-
# The currently supported attribute is +x-goog-version+, which you can
|
203
|
-
# use to change the format of the pushed message. This attribute
|
204
|
-
# indicates the version of the data expected by the endpoint. This
|
205
|
-
# controls the shape of the pushed message (i.e., its fields and metadata).
|
206
|
-
# The endpoint version is based on the version of the Pub/Sub API.
|
207
|
-
#
|
208
|
-
# If not present during the +CreateSubscription+ call, it will default to
|
209
|
-
# the version of the API used to make such call. If not present during a
|
210
|
-
# +ModifyPushConfig+ call, its value will not be changed. +GetSubscription+
|
211
|
-
# calls will always return a valid version, even if the subscription was
|
212
|
-
# created without this attribute.
|
213
|
-
#
|
214
|
-
# The possible values for this attribute are:
|
215
|
-
#
|
216
|
-
# * +v1beta1+: uses the push format defined in the v1beta1 Pub/Sub API.
|
217
|
-
# * +v1+ or +v1beta2+: uses the push format defined in the v1 Pub/Sub API.
|
218
|
-
class PushConfig; end
|
219
|
-
|
220
|
-
# A message and its corresponding acknowledgment ID.
|
221
|
-
# @!attribute [rw] ack_id
|
222
|
-
# @return [String]
|
223
|
-
# This ID can be used to acknowledge the received message.
|
224
|
-
# @!attribute [rw] message
|
225
|
-
# @return [Google::Pubsub::V1::PubsubMessage]
|
226
|
-
# The message.
|
227
|
-
class ReceivedMessage; end
|
228
|
-
|
229
|
-
# Request for the GetSubscription method.
|
230
|
-
# @!attribute [rw] subscription
|
231
|
-
# @return [String]
|
232
|
-
# The name of the subscription to get.
|
233
|
-
# Format is +projects/{project}/subscriptions/{sub}+.
|
234
|
-
class GetSubscriptionRequest; end
|
235
|
-
|
236
|
-
# Request for the UpdateSubscription method.
|
237
|
-
# @!attribute [rw] subscription
|
238
|
-
# @return [Google::Pubsub::V1::Subscription]
|
239
|
-
# The updated subscription object.
|
240
|
-
# @!attribute [rw] update_mask
|
241
|
-
# @return [Google::Protobuf::FieldMask]
|
242
|
-
# Indicates which fields in the provided subscription to update.
|
243
|
-
# Must be specified and non-empty.
|
244
|
-
class UpdateSubscriptionRequest; end
|
245
|
-
|
246
|
-
# Request for the +ListSubscriptions+ method.
|
247
|
-
# @!attribute [rw] project
|
248
|
-
# @return [String]
|
249
|
-
# The name of the cloud project that subscriptions belong to.
|
250
|
-
# Format is +projects/{project}+.
|
251
|
-
# @!attribute [rw] page_size
|
252
|
-
# @return [Integer]
|
253
|
-
# Maximum number of subscriptions to return.
|
254
|
-
# @!attribute [rw] page_token
|
255
|
-
# @return [String]
|
256
|
-
# The value returned by the last +ListSubscriptionsResponse+; indicates that
|
257
|
-
# this is a continuation of a prior +ListSubscriptions+ call, and that the
|
258
|
-
# system should return the next page of data.
|
259
|
-
class ListSubscriptionsRequest; end
|
260
|
-
|
261
|
-
# Response for the +ListSubscriptions+ method.
|
262
|
-
# @!attribute [rw] subscriptions
|
263
|
-
# @return [Array<Google::Pubsub::V1::Subscription>]
|
264
|
-
# The subscriptions that match the request.
|
265
|
-
# @!attribute [rw] next_page_token
|
266
|
-
# @return [String]
|
267
|
-
# If not empty, indicates that there may be more subscriptions that match
|
268
|
-
# the request; this value should be passed in a new
|
269
|
-
# +ListSubscriptionsRequest+ to get more subscriptions.
|
270
|
-
class ListSubscriptionsResponse; end
|
271
|
-
|
272
|
-
# Request for the DeleteSubscription method.
|
273
|
-
# @!attribute [rw] subscription
|
274
|
-
# @return [String]
|
275
|
-
# The subscription to delete.
|
276
|
-
# Format is +projects/{project}/subscriptions/{sub}+.
|
277
|
-
class DeleteSubscriptionRequest; end
|
278
|
-
|
279
|
-
# Request for the ModifyPushConfig method.
|
280
|
-
# @!attribute [rw] subscription
|
281
|
-
# @return [String]
|
282
|
-
# The name of the subscription.
|
283
|
-
# Format is +projects/{project}/subscriptions/{sub}+.
|
284
|
-
# @!attribute [rw] push_config
|
285
|
-
# @return [Google::Pubsub::V1::PushConfig]
|
286
|
-
# The push configuration for future deliveries.
|
287
|
-
#
|
288
|
-
# An empty +pushConfig+ indicates that the Pub/Sub system should
|
289
|
-
# stop pushing messages from the given subscription and allow
|
290
|
-
# messages to be pulled and acknowledged - effectively pausing
|
291
|
-
# the subscription if +Pull+ is not called.
|
292
|
-
class ModifyPushConfigRequest; end
|
293
|
-
|
294
|
-
# Request for the +Pull+ method.
|
295
|
-
# @!attribute [rw] subscription
|
296
|
-
# @return [String]
|
297
|
-
# The subscription from which messages should be pulled.
|
298
|
-
# Format is +projects/{project}/subscriptions/{sub}+.
|
299
|
-
# @!attribute [rw] return_immediately
|
300
|
-
# @return [true, false]
|
301
|
-
# If this field set to true, the system will respond immediately even if
|
302
|
-
# it there are no messages available to return in the +Pull+ response.
|
303
|
-
# Otherwise, the system may wait (for a bounded amount of time) until at
|
304
|
-
# least one message is available, rather than returning no messages. The
|
305
|
-
# client may cancel the request if it does not wish to wait any longer for
|
306
|
-
# the response.
|
307
|
-
# @!attribute [rw] max_messages
|
308
|
-
# @return [Integer]
|
309
|
-
# The maximum number of messages returned for this request. The Pub/Sub
|
310
|
-
# system may return fewer than the number specified.
|
311
|
-
class PullRequest; end
|
312
|
-
|
313
|
-
# Response for the +Pull+ method.
|
314
|
-
# @!attribute [rw] received_messages
|
315
|
-
# @return [Array<Google::Pubsub::V1::ReceivedMessage>]
|
316
|
-
# Received Pub/Sub messages. The Pub/Sub system will return zero messages if
|
317
|
-
# there are no more available in the backlog. The Pub/Sub system may return
|
318
|
-
# fewer than the +maxMessages+ requested even if there are more messages
|
319
|
-
# available in the backlog.
|
320
|
-
class PullResponse; end
|
321
|
-
|
322
|
-
# Request for the ModifyAckDeadline method.
|
323
|
-
# @!attribute [rw] subscription
|
324
|
-
# @return [String]
|
325
|
-
# The name of the subscription.
|
326
|
-
# Format is +projects/{project}/subscriptions/{sub}+.
|
327
|
-
# @!attribute [rw] ack_ids
|
328
|
-
# @return [Array<String>]
|
329
|
-
# List of acknowledgment IDs.
|
330
|
-
# @!attribute [rw] ack_deadline_seconds
|
331
|
-
# @return [Integer]
|
332
|
-
# The new ack deadline with respect to the time this request was sent to
|
333
|
-
# the Pub/Sub system. For example, if the value is 10, the new
|
334
|
-
# ack deadline will expire 10 seconds after the +ModifyAckDeadline+ call
|
335
|
-
# was made. Specifying zero may immediately make the message available for
|
336
|
-
# another pull request.
|
337
|
-
# The minimum deadline you can specify is 0 seconds.
|
338
|
-
# The maximum deadline you can specify is 600 seconds (10 minutes).
|
339
|
-
class ModifyAckDeadlineRequest; end
|
340
|
-
|
341
|
-
# Request for the Acknowledge method.
|
342
|
-
# @!attribute [rw] subscription
|
343
|
-
# @return [String]
|
344
|
-
# The subscription whose message is being acknowledged.
|
345
|
-
# Format is +projects/{project}/subscriptions/{sub}+.
|
346
|
-
# @!attribute [rw] ack_ids
|
347
|
-
# @return [Array<String>]
|
348
|
-
# The acknowledgment ID for the messages being acknowledged that was returned
|
349
|
-
# by the Pub/Sub system in the +Pull+ response. Must not be empty.
|
350
|
-
class AcknowledgeRequest; end
|
351
|
-
|
352
|
-
# Request for the +StreamingPull+ streaming RPC method. This request is used to
|
353
|
-
# establish the initial stream as well as to stream acknowledgements and ack
|
354
|
-
# deadline modifications from the client to the server.
|
355
|
-
# @!attribute [rw] subscription
|
356
|
-
# @return [String]
|
357
|
-
# The subscription for which to initialize the new stream. This must be
|
358
|
-
# provided in the first request on the stream, and must not be set in
|
359
|
-
# subsequent requests from client to server.
|
360
|
-
# Format is +projects/{project}/subscriptions/{sub}+.
|
361
|
-
# @!attribute [rw] ack_ids
|
362
|
-
# @return [Array<String>]
|
363
|
-
# List of acknowledgement IDs for acknowledging previously received messages
|
364
|
-
# (received on this stream or a different stream). If an ack ID has expired,
|
365
|
-
# the corresponding message may be redelivered later. Acknowledging a message
|
366
|
-
# more than once will not result in an error. If the acknowledgement ID is
|
367
|
-
# malformed, the stream will be aborted with status +INVALID_ARGUMENT+.
|
368
|
-
# @!attribute [rw] modify_deadline_seconds
|
369
|
-
# @return [Array<Integer>]
|
370
|
-
# The list of new ack deadlines for the IDs listed in
|
371
|
-
# +modify_deadline_ack_ids+. The size of this list must be the same as the
|
372
|
-
# size of +modify_deadline_ack_ids+. If it differs the stream will be aborted
|
373
|
-
# with +INVALID_ARGUMENT+. Each element in this list is applied to the
|
374
|
-
# element in the same position in +modify_deadline_ack_ids+. The new ack
|
375
|
-
# deadline is with respect to the time this request was sent to the Pub/Sub
|
376
|
-
# system. Must be >= 0. For example, if the value is 10, the new ack deadline
|
377
|
-
# will expire 10 seconds after this request is received. If the value is 0,
|
378
|
-
# the message is immediately made available for another streaming or
|
379
|
-
# non-streaming pull request. If the value is < 0 (an error), the stream will
|
380
|
-
# be aborted with status +INVALID_ARGUMENT+.
|
381
|
-
# @!attribute [rw] modify_deadline_ack_ids
|
382
|
-
# @return [Array<String>]
|
383
|
-
# List of acknowledgement IDs whose deadline will be modified based on the
|
384
|
-
# corresponding element in +modify_deadline_seconds+. This field can be used
|
385
|
-
# to indicate that more time is needed to process a message by the
|
386
|
-
# subscriber, or to make the message available for redelivery if the
|
387
|
-
# processing was interrupted.
|
388
|
-
# @!attribute [rw] stream_ack_deadline_seconds
|
389
|
-
# @return [Integer]
|
390
|
-
# The ack deadline to use for the stream. This must be provided in the
|
391
|
-
# first request on the stream, but it can also be updated on subsequent
|
392
|
-
# requests from client to server. The minimum deadline you can specify is 10
|
393
|
-
# seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
|
394
|
-
class StreamingPullRequest; end
|
395
|
-
|
396
|
-
# Response for the +StreamingPull+ method. This response is used to stream
|
397
|
-
# messages from the server to the client.
|
398
|
-
# @!attribute [rw] received_messages
|
399
|
-
# @return [Array<Google::Pubsub::V1::ReceivedMessage>]
|
400
|
-
# Received Pub/Sub messages. This will not be empty.
|
401
|
-
class StreamingPullResponse; end
|
402
|
-
|
403
|
-
# Request for the +CreateSnapshot+ method.
|
404
|
-
# @!attribute [rw] name
|
405
|
-
# @return [String]
|
406
|
-
# Optional user-provided name for this snapshot.
|
407
|
-
# If the name is not provided in the request, the server will assign a random
|
408
|
-
# name for this snapshot on the same project as the subscription.
|
409
|
-
# Note that for REST API requests, you must specify a name.
|
410
|
-
# Format is +projects/{project}/snapshots/{snap}+.
|
411
|
-
# @!attribute [rw] subscription
|
412
|
-
# @return [String]
|
413
|
-
# The subscription whose backlog the snapshot retains.
|
414
|
-
# Specifically, the created snapshot is guaranteed to retain:
|
415
|
-
# (a) The existing backlog on the subscription. More precisely, this is
|
416
|
-
# defined as the messages in the subscription's backlog that are
|
417
|
-
# unacknowledged upon the successful completion of the
|
418
|
-
# +CreateSnapshot+ request; as well as:
|
419
|
-
# (b) Any messages published to the subscription's topic following the
|
420
|
-
# successful completion of the CreateSnapshot request.
|
421
|
-
# Format is +projects/{project}/subscriptions/{sub}+.
|
422
|
-
class CreateSnapshotRequest; end
|
423
|
-
|
424
|
-
# A snapshot resource.
|
425
|
-
# @!attribute [rw] name
|
426
|
-
# @return [String]
|
427
|
-
# The name of the snapshot.
|
428
|
-
# @!attribute [rw] topic
|
429
|
-
# @return [String]
|
430
|
-
# The name of the topic from which this snapshot is retaining messages.
|
431
|
-
# @!attribute [rw] expiration_time
|
432
|
-
# @return [Google::Protobuf::Timestamp]
|
433
|
-
# The snapshot is guaranteed to exist up until this time.
|
434
|
-
# A newly-created snapshot expires no later than 7 days from the time of its
|
435
|
-
# creation. Its exact lifetime is determined at creation by the existing
|
436
|
-
# backlog in the source subscription. Specifically, the lifetime of the
|
437
|
-
# snapshot is +7 days - (age of oldest unacked message in the subscription)+.
|
438
|
-
# For example, consider a subscription whose oldest unacked message is 3 days
|
439
|
-
# old. If a snapshot is created from this subscription, the snapshot -- which
|
440
|
-
# will always capture this 3-day-old backlog as long as the snapshot
|
441
|
-
# exists -- will expire in 4 days.
|
442
|
-
class Snapshot; end
|
443
|
-
|
444
|
-
# Request for the +ListSnapshots+ method.
|
445
|
-
# @!attribute [rw] project
|
446
|
-
# @return [String]
|
447
|
-
# The name of the cloud project that snapshots belong to.
|
448
|
-
# Format is +projects/{project}+.
|
449
|
-
# @!attribute [rw] page_size
|
450
|
-
# @return [Integer]
|
451
|
-
# Maximum number of snapshots to return.
|
452
|
-
# @!attribute [rw] page_token
|
453
|
-
# @return [String]
|
454
|
-
# The value returned by the last +ListSnapshotsResponse+; indicates that this
|
455
|
-
# is a continuation of a prior +ListSnapshots+ call, and that the system
|
456
|
-
# should return the next page of data.
|
457
|
-
class ListSnapshotsRequest; end
|
458
|
-
|
459
|
-
# Response for the +ListSnapshots+ method.
|
460
|
-
# @!attribute [rw] snapshots
|
461
|
-
# @return [Array<Google::Pubsub::V1::Snapshot>]
|
462
|
-
# The resulting snapshots.
|
463
|
-
# @!attribute [rw] next_page_token
|
464
|
-
# @return [String]
|
465
|
-
# If not empty, indicates that there may be more snapshot that match the
|
466
|
-
# request; this value should be passed in a new +ListSnapshotsRequest+.
|
467
|
-
class ListSnapshotsResponse; end
|
468
|
-
|
469
|
-
# Request for the +DeleteSnapshot+ method.
|
470
|
-
# @!attribute [rw] snapshot
|
471
|
-
# @return [String]
|
472
|
-
# The name of the snapshot to delete.
|
473
|
-
# Format is +projects/{project}/snapshots/{snap}+.
|
474
|
-
class DeleteSnapshotRequest; end
|
475
|
-
|
476
|
-
# Request for the +Seek+ method.
|
477
|
-
# @!attribute [rw] subscription
|
478
|
-
# @return [String]
|
479
|
-
# The subscription to affect.
|
480
|
-
# @!attribute [rw] time
|
481
|
-
# @return [Google::Protobuf::Timestamp]
|
482
|
-
# The time to seek to.
|
483
|
-
# Messages retained in the subscription that were published before this
|
484
|
-
# time are marked as acknowledged, and messages retained in the
|
485
|
-
# subscription that were published after this time are marked as
|
486
|
-
# unacknowledged. Note that this operation affects only those messages
|
487
|
-
# retained in the subscription (configured by the combination of
|
488
|
-
# +message_retention_duration+ and +retain_acked_messages+). For example,
|
489
|
-
# if +time+ corresponds to a point before the message retention
|
490
|
-
# window (or to a point before the system's notion of the subscription
|
491
|
-
# creation time), only retained messages will be marked as unacknowledged,
|
492
|
-
# and already-expunged messages will not be restored.
|
493
|
-
# @!attribute [rw] snapshot
|
494
|
-
# @return [String]
|
495
|
-
# The snapshot to seek to. The snapshot's topic must be the same as that of
|
496
|
-
# the provided subscription.
|
497
|
-
# Format is +projects/{project}/snapshots/{snap}+.
|
498
|
-
class SeekRequest; end
|
499
|
-
|
500
|
-
class SeekResponse; end
|
501
|
-
end
|
502
|
-
end
|
503
|
-
end
|