google-cloud-pubsub 0.26.0 → 2.6.1

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 (56) hide show
  1. checksums.yaml +5 -5
  2. data/.yardopts +12 -2
  3. data/AUTHENTICATION.md +178 -0
  4. data/CHANGELOG.md +659 -0
  5. data/CODE_OF_CONDUCT.md +40 -0
  6. data/CONTRIBUTING.md +187 -0
  7. data/EMULATOR.md +37 -0
  8. data/LICENSE +2 -2
  9. data/LOGGING.md +32 -0
  10. data/OVERVIEW.md +528 -0
  11. data/TROUBLESHOOTING.md +31 -0
  12. data/lib/google/cloud/pubsub/async_publisher/batch.rb +310 -0
  13. data/lib/google/cloud/pubsub/async_publisher.rb +402 -0
  14. data/lib/google/cloud/pubsub/batch_publisher.rb +100 -0
  15. data/lib/google/cloud/pubsub/convert.rb +91 -0
  16. data/lib/google/cloud/pubsub/credentials.rb +26 -10
  17. data/lib/google/cloud/pubsub/errors.rb +85 -0
  18. data/lib/google/cloud/pubsub/message.rb +80 -17
  19. data/lib/google/cloud/pubsub/policy.rb +17 -14
  20. data/lib/google/cloud/pubsub/project.rb +364 -250
  21. data/lib/google/cloud/pubsub/publish_result.rb +103 -0
  22. data/lib/google/cloud/pubsub/received_message.rb +162 -24
  23. data/lib/google/cloud/pubsub/retry_policy.rb +88 -0
  24. data/lib/google/cloud/pubsub/schema/list.rb +180 -0
  25. data/lib/google/cloud/pubsub/schema.rb +310 -0
  26. data/lib/google/cloud/pubsub/service.rb +281 -265
  27. data/lib/google/cloud/pubsub/snapshot/list.rb +21 -21
  28. data/lib/google/cloud/pubsub/snapshot.rb +55 -15
  29. data/lib/google/cloud/pubsub/subscriber/enumerator_queue.rb +54 -0
  30. data/lib/google/cloud/pubsub/subscriber/inventory.rb +173 -0
  31. data/lib/google/cloud/pubsub/subscriber/sequencer.rb +115 -0
  32. data/lib/google/cloud/pubsub/subscriber/stream.rb +400 -0
  33. data/lib/google/cloud/pubsub/subscriber/timed_unary_buffer.rb +230 -0
  34. data/lib/google/cloud/pubsub/subscriber.rb +417 -0
  35. data/lib/google/cloud/pubsub/subscription/list.rb +28 -28
  36. data/lib/google/cloud/pubsub/subscription/push_config.rb +268 -0
  37. data/lib/google/cloud/pubsub/subscription.rb +900 -172
  38. data/lib/google/cloud/pubsub/topic/list.rb +21 -21
  39. data/lib/google/cloud/pubsub/topic.rb +674 -95
  40. data/lib/google/cloud/pubsub/version.rb +6 -4
  41. data/lib/google/cloud/pubsub.rb +104 -439
  42. data/lib/google-cloud-pubsub.rb +60 -29
  43. metadata +88 -50
  44. data/README.md +0 -69
  45. data/lib/google/cloud/pubsub/topic/publisher.rb +0 -86
  46. data/lib/google/cloud/pubsub/v1/doc/google/protobuf/duration.rb +0 -77
  47. data/lib/google/cloud/pubsub/v1/doc/google/protobuf/field_mask.rb +0 -223
  48. data/lib/google/cloud/pubsub/v1/doc/google/protobuf/timestamp.rb +0 -81
  49. data/lib/google/cloud/pubsub/v1/doc/google/pubsub/v1/pubsub.rb +0 -503
  50. data/lib/google/cloud/pubsub/v1/publisher_client.rb +0 -605
  51. data/lib/google/cloud/pubsub/v1/publisher_client_config.json +0 -96
  52. data/lib/google/cloud/pubsub/v1/subscriber_client.rb +0 -1104
  53. data/lib/google/cloud/pubsub/v1/subscriber_client_config.json +0 -127
  54. data/lib/google/cloud/pubsub/v1.rb +0 -17
  55. data/lib/google/pubsub/v1/pubsub_pb.rb +0 -187
  56. data/lib/google/pubsub/v1/pubsub_services_pb.rb +0 -159
@@ -1,127 +0,0 @@
1
- {
2
- "interfaces": {
3
- "google.pubsub.v1.Subscriber": {
4
- "retry_codes": {
5
- "idempotent": [
6
- "DEADLINE_EXCEEDED",
7
- "UNAVAILABLE"
8
- ],
9
- "non_idempotent": [],
10
- "pull": [
11
- "CANCELLED",
12
- "DEADLINE_EXCEEDED",
13
- "RESOURCE_EXHAUSTED",
14
- "INTERNAL",
15
- "UNAVAILABLE"
16
- ]
17
- },
18
- "retry_params": {
19
- "default": {
20
- "initial_retry_delay_millis": 100,
21
- "retry_delay_multiplier": 1.3,
22
- "max_retry_delay_millis": 60000,
23
- "initial_rpc_timeout_millis": 60000,
24
- "rpc_timeout_multiplier": 1.0,
25
- "max_rpc_timeout_millis": 60000,
26
- "total_timeout_millis": 600000
27
- },
28
- "messaging": {
29
- "initial_retry_delay_millis": 100,
30
- "retry_delay_multiplier": 1.3,
31
- "max_retry_delay_millis": 60000,
32
- "initial_rpc_timeout_millis": 12000,
33
- "rpc_timeout_multiplier": 1.0,
34
- "max_rpc_timeout_millis": 12000,
35
- "total_timeout_millis": 600000
36
- }
37
- },
38
- "methods": {
39
- "CreateSubscription": {
40
- "timeout_millis": 60000,
41
- "retry_codes_name": "idempotent",
42
- "retry_params_name": "default"
43
- },
44
- "GetSubscription": {
45
- "timeout_millis": 60000,
46
- "retry_codes_name": "idempotent",
47
- "retry_params_name": "default"
48
- },
49
- "UpdateSubscription": {
50
- "timeout_millis": 60000,
51
- "retry_codes_name": "idempotent",
52
- "retry_params_name": "default"
53
- },
54
- "ListSubscriptions": {
55
- "timeout_millis": 60000,
56
- "retry_codes_name": "idempotent",
57
- "retry_params_name": "default"
58
- },
59
- "DeleteSubscription": {
60
- "timeout_millis": 60000,
61
- "retry_codes_name": "idempotent",
62
- "retry_params_name": "default"
63
- },
64
- "ModifyAckDeadline": {
65
- "timeout_millis": 60000,
66
- "retry_codes_name": "non_idempotent",
67
- "retry_params_name": "default"
68
- },
69
- "Acknowledge": {
70
- "timeout_millis": 60000,
71
- "retry_codes_name": "non_idempotent",
72
- "retry_params_name": "messaging"
73
- },
74
- "Pull": {
75
- "timeout_millis": 60000,
76
- "retry_codes_name": "pull",
77
- "retry_params_name": "messaging"
78
- },
79
- "StreamingPull": {
80
- "timeout_millis": 60000,
81
- "retry_codes_name": "pull",
82
- "retry_params_name": "messaging"
83
- },
84
- "ModifyPushConfig": {
85
- "timeout_millis": 60000,
86
- "retry_codes_name": "non_idempotent",
87
- "retry_params_name": "default"
88
- },
89
- "ListSnapshots": {
90
- "timeout_millis": 60000,
91
- "retry_codes_name": "idempotent",
92
- "retry_params_name": "default"
93
- },
94
- "CreateSnapshot": {
95
- "timeout_millis": 60000,
96
- "retry_codes_name": "idempotent",
97
- "retry_params_name": "default"
98
- },
99
- "DeleteSnapshot": {
100
- "timeout_millis": 60000,
101
- "retry_codes_name": "idempotent",
102
- "retry_params_name": "default"
103
- },
104
- "Seek": {
105
- "timeout_millis": 60000,
106
- "retry_codes_name": "non_idempotent",
107
- "retry_params_name": "default"
108
- },
109
- "SetIamPolicy": {
110
- "timeout_millis": 60000,
111
- "retry_codes_name": "non_idempotent",
112
- "retry_params_name": "default"
113
- },
114
- "GetIamPolicy": {
115
- "timeout_millis": 60000,
116
- "retry_codes_name": "idempotent",
117
- "retry_params_name": "default"
118
- },
119
- "TestIamPermissions": {
120
- "timeout_millis": 60000,
121
- "retry_codes_name": "non_idempotent",
122
- "retry_params_name": "default"
123
- }
124
- }
125
- }
126
- }
127
- }
@@ -1,17 +0,0 @@
1
- # Copyright 2015 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
-
16
- require "google/cloud/pubsub/v1/publisher_client"
17
- require "google/cloud/pubsub/v1/subscriber_client"
@@ -1,187 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/pubsub/v1/pubsub.proto
3
-
4
- require 'google/protobuf'
5
-
6
- require 'google/api/annotations_pb'
7
- require 'google/protobuf/duration_pb'
8
- require 'google/protobuf/empty_pb'
9
- require 'google/protobuf/field_mask_pb'
10
- require 'google/protobuf/timestamp_pb'
11
- Google::Protobuf::DescriptorPool.generated_pool.build do
12
- add_message "google.pubsub.v1.Topic" do
13
- optional :name, :string, 1
14
- end
15
- add_message "google.pubsub.v1.PubsubMessage" do
16
- optional :data, :bytes, 1
17
- map :attributes, :string, :string, 2
18
- optional :message_id, :string, 3
19
- optional :publish_time, :message, 4, "google.protobuf.Timestamp"
20
- end
21
- add_message "google.pubsub.v1.GetTopicRequest" do
22
- optional :topic, :string, 1
23
- end
24
- add_message "google.pubsub.v1.PublishRequest" do
25
- optional :topic, :string, 1
26
- repeated :messages, :message, 2, "google.pubsub.v1.PubsubMessage"
27
- end
28
- add_message "google.pubsub.v1.PublishResponse" do
29
- repeated :message_ids, :string, 1
30
- end
31
- add_message "google.pubsub.v1.ListTopicsRequest" do
32
- optional :project, :string, 1
33
- optional :page_size, :int32, 2
34
- optional :page_token, :string, 3
35
- end
36
- add_message "google.pubsub.v1.ListTopicsResponse" do
37
- repeated :topics, :message, 1, "google.pubsub.v1.Topic"
38
- optional :next_page_token, :string, 2
39
- end
40
- add_message "google.pubsub.v1.ListTopicSubscriptionsRequest" do
41
- optional :topic, :string, 1
42
- optional :page_size, :int32, 2
43
- optional :page_token, :string, 3
44
- end
45
- add_message "google.pubsub.v1.ListTopicSubscriptionsResponse" do
46
- repeated :subscriptions, :string, 1
47
- optional :next_page_token, :string, 2
48
- end
49
- add_message "google.pubsub.v1.DeleteTopicRequest" do
50
- optional :topic, :string, 1
51
- end
52
- add_message "google.pubsub.v1.Subscription" do
53
- optional :name, :string, 1
54
- optional :topic, :string, 2
55
- optional :push_config, :message, 4, "google.pubsub.v1.PushConfig"
56
- optional :ack_deadline_seconds, :int32, 5
57
- optional :retain_acked_messages, :bool, 7
58
- optional :message_retention_duration, :message, 8, "google.protobuf.Duration"
59
- end
60
- add_message "google.pubsub.v1.PushConfig" do
61
- optional :push_endpoint, :string, 1
62
- map :attributes, :string, :string, 2
63
- end
64
- add_message "google.pubsub.v1.ReceivedMessage" do
65
- optional :ack_id, :string, 1
66
- optional :message, :message, 2, "google.pubsub.v1.PubsubMessage"
67
- end
68
- add_message "google.pubsub.v1.GetSubscriptionRequest" do
69
- optional :subscription, :string, 1
70
- end
71
- add_message "google.pubsub.v1.UpdateSubscriptionRequest" do
72
- optional :subscription, :message, 1, "google.pubsub.v1.Subscription"
73
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
74
- end
75
- add_message "google.pubsub.v1.ListSubscriptionsRequest" do
76
- optional :project, :string, 1
77
- optional :page_size, :int32, 2
78
- optional :page_token, :string, 3
79
- end
80
- add_message "google.pubsub.v1.ListSubscriptionsResponse" do
81
- repeated :subscriptions, :message, 1, "google.pubsub.v1.Subscription"
82
- optional :next_page_token, :string, 2
83
- end
84
- add_message "google.pubsub.v1.DeleteSubscriptionRequest" do
85
- optional :subscription, :string, 1
86
- end
87
- add_message "google.pubsub.v1.ModifyPushConfigRequest" do
88
- optional :subscription, :string, 1
89
- optional :push_config, :message, 2, "google.pubsub.v1.PushConfig"
90
- end
91
- add_message "google.pubsub.v1.PullRequest" do
92
- optional :subscription, :string, 1
93
- optional :return_immediately, :bool, 2
94
- optional :max_messages, :int32, 3
95
- end
96
- add_message "google.pubsub.v1.PullResponse" do
97
- repeated :received_messages, :message, 1, "google.pubsub.v1.ReceivedMessage"
98
- end
99
- add_message "google.pubsub.v1.ModifyAckDeadlineRequest" do
100
- optional :subscription, :string, 1
101
- repeated :ack_ids, :string, 4
102
- optional :ack_deadline_seconds, :int32, 3
103
- end
104
- add_message "google.pubsub.v1.AcknowledgeRequest" do
105
- optional :subscription, :string, 1
106
- repeated :ack_ids, :string, 2
107
- end
108
- add_message "google.pubsub.v1.StreamingPullRequest" do
109
- optional :subscription, :string, 1
110
- repeated :ack_ids, :string, 2
111
- repeated :modify_deadline_seconds, :int32, 3
112
- repeated :modify_deadline_ack_ids, :string, 4
113
- optional :stream_ack_deadline_seconds, :int32, 5
114
- end
115
- add_message "google.pubsub.v1.StreamingPullResponse" do
116
- repeated :received_messages, :message, 1, "google.pubsub.v1.ReceivedMessage"
117
- end
118
- add_message "google.pubsub.v1.CreateSnapshotRequest" do
119
- optional :name, :string, 1
120
- optional :subscription, :string, 2
121
- end
122
- add_message "google.pubsub.v1.Snapshot" do
123
- optional :name, :string, 1
124
- optional :topic, :string, 2
125
- optional :expiration_time, :message, 3, "google.protobuf.Timestamp"
126
- end
127
- add_message "google.pubsub.v1.ListSnapshotsRequest" do
128
- optional :project, :string, 1
129
- optional :page_size, :int32, 2
130
- optional :page_token, :string, 3
131
- end
132
- add_message "google.pubsub.v1.ListSnapshotsResponse" do
133
- repeated :snapshots, :message, 1, "google.pubsub.v1.Snapshot"
134
- optional :next_page_token, :string, 2
135
- end
136
- add_message "google.pubsub.v1.DeleteSnapshotRequest" do
137
- optional :snapshot, :string, 1
138
- end
139
- add_message "google.pubsub.v1.SeekRequest" do
140
- optional :subscription, :string, 1
141
- oneof :target do
142
- optional :time, :message, 2, "google.protobuf.Timestamp"
143
- optional :snapshot, :string, 3
144
- end
145
- end
146
- add_message "google.pubsub.v1.SeekResponse" do
147
- end
148
- end
149
-
150
- module Google
151
- module Pubsub
152
- module V1
153
- Topic = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Topic").msgclass
154
- PubsubMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PubsubMessage").msgclass
155
- GetTopicRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetTopicRequest").msgclass
156
- PublishRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PublishRequest").msgclass
157
- PublishResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PublishResponse").msgclass
158
- ListTopicsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicsRequest").msgclass
159
- ListTopicsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicsResponse").msgclass
160
- ListTopicSubscriptionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicSubscriptionsRequest").msgclass
161
- ListTopicSubscriptionsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListTopicSubscriptionsResponse").msgclass
162
- DeleteTopicRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteTopicRequest").msgclass
163
- Subscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Subscription").msgclass
164
- PushConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PushConfig").msgclass
165
- ReceivedMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ReceivedMessage").msgclass
166
- GetSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetSubscriptionRequest").msgclass
167
- UpdateSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.UpdateSubscriptionRequest").msgclass
168
- ListSubscriptionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSubscriptionsRequest").msgclass
169
- ListSubscriptionsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSubscriptionsResponse").msgclass
170
- DeleteSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteSubscriptionRequest").msgclass
171
- ModifyPushConfigRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ModifyPushConfigRequest").msgclass
172
- PullRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PullRequest").msgclass
173
- PullResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PullResponse").msgclass
174
- ModifyAckDeadlineRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ModifyAckDeadlineRequest").msgclass
175
- AcknowledgeRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.AcknowledgeRequest").msgclass
176
- StreamingPullRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.StreamingPullRequest").msgclass
177
- StreamingPullResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.StreamingPullResponse").msgclass
178
- CreateSnapshotRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.CreateSnapshotRequest").msgclass
179
- Snapshot = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Snapshot").msgclass
180
- ListSnapshotsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSnapshotsRequest").msgclass
181
- ListSnapshotsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ListSnapshotsResponse").msgclass
182
- DeleteSnapshotRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeleteSnapshotRequest").msgclass
183
- SeekRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.SeekRequest").msgclass
184
- SeekResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.SeekResponse").msgclass
185
- end
186
- end
187
- end
@@ -1,159 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # Source: google/pubsub/v1/pubsub.proto for package 'google.pubsub.v1'
3
- # Original file comments:
4
- # Copyright 2017 Google Inc.
5
- #
6
- # Licensed under the Apache License, Version 2.0 (the "License");
7
- # you may not use this file except in compliance with the License.
8
- # You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing, software
13
- # distributed under the License is distributed on an "AS IS" BASIS,
14
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- # See the License for the specific language governing permissions and
16
- # limitations under the License.
17
- #
18
-
19
- require 'grpc'
20
- require 'google/pubsub/v1/pubsub_pb'
21
-
22
- module Google
23
- module Pubsub
24
- module V1
25
- module Subscriber
26
- # The service that an application uses to manipulate subscriptions and to
27
- # consume messages from a subscription via the `Pull` method.
28
- class Service
29
-
30
- include GRPC::GenericService
31
-
32
- self.marshal_class_method = :encode
33
- self.unmarshal_class_method = :decode
34
- self.service_name = 'google.pubsub.v1.Subscriber'
35
-
36
- # Creates a subscription to a given topic.
37
- # If the subscription already exists, returns `ALREADY_EXISTS`.
38
- # If the corresponding topic doesn't exist, returns `NOT_FOUND`.
39
- #
40
- # If the name is not provided in the request, the server will assign a random
41
- # name for this subscription on the same project as the topic, conforming
42
- # to the
43
- # [resource name format](https://cloud.google.com/pubsub/docs/overview#names).
44
- # The generated name is populated in the returned Subscription object.
45
- # Note that for REST API requests, you must specify a name in the request.
46
- rpc :CreateSubscription, Subscription, Subscription
47
- # Gets the configuration details of a subscription.
48
- rpc :GetSubscription, GetSubscriptionRequest, Subscription
49
- # Updates an existing subscription. Note that certain properties of a
50
- # subscription, such as its topic, are not modifiable.
51
- rpc :UpdateSubscription, UpdateSubscriptionRequest, Subscription
52
- # Lists matching subscriptions.
53
- rpc :ListSubscriptions, ListSubscriptionsRequest, ListSubscriptionsResponse
54
- # Deletes an existing subscription. All messages retained in the subscription
55
- # are immediately dropped. Calls to `Pull` after deletion will return
56
- # `NOT_FOUND`. After a subscription is deleted, a new one may be created with
57
- # the same name, but the new one has no association with the old
58
- # subscription or its topic unless the same topic is specified.
59
- rpc :DeleteSubscription, DeleteSubscriptionRequest, Google::Protobuf::Empty
60
- # Modifies the ack deadline for a specific message. This method is useful
61
- # to indicate that more time is needed to process a message by the
62
- # subscriber, or to make the message available for redelivery if the
63
- # processing was interrupted. Note that this does not modify the
64
- # subscription-level `ackDeadlineSeconds` used for subsequent messages.
65
- rpc :ModifyAckDeadline, ModifyAckDeadlineRequest, Google::Protobuf::Empty
66
- # Acknowledges the messages associated with the `ack_ids` in the
67
- # `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages
68
- # from the subscription.
69
- #
70
- # Acknowledging a message whose ack deadline has expired may succeed,
71
- # but such a message may be redelivered later. Acknowledging a message more
72
- # than once will not result in an error.
73
- rpc :Acknowledge, AcknowledgeRequest, Google::Protobuf::Empty
74
- # Pulls messages from the server. Returns an empty list if there are no
75
- # messages available in the backlog. The server may return `UNAVAILABLE` if
76
- # there are too many concurrent pull requests pending for the given
77
- # subscription.
78
- rpc :Pull, PullRequest, PullResponse
79
- # (EXPERIMENTAL) StreamingPull is an experimental feature. This RPC will
80
- # respond with UNIMPLEMENTED errors unless you have been invited to test
81
- # this feature. Contact cloud-pubsub@google.com with any questions.
82
- #
83
- # Establishes a stream with the server, which sends messages down to the
84
- # client. The client streams acknowledgements and ack deadline modifications
85
- # back to the server. The server will close the stream and return the status
86
- # on any error. The server may close the stream with status `OK` to reassign
87
- # server-side resources, in which case, the client should re-establish the
88
- # stream. `UNAVAILABLE` may also be returned in the case of a transient error
89
- # (e.g., a server restart). These should also be retried by the client. Flow
90
- # control can be achieved by configuring the underlying RPC channel.
91
- rpc :StreamingPull, stream(StreamingPullRequest), stream(StreamingPullResponse)
92
- # Modifies the `PushConfig` for a specified subscription.
93
- #
94
- # This may be used to change a push subscription to a pull one (signified by
95
- # an empty `PushConfig`) or vice versa, or change the endpoint URL and other
96
- # attributes of a push subscription. Messages will accumulate for delivery
97
- # continuously through the call regardless of changes to the `PushConfig`.
98
- rpc :ModifyPushConfig, ModifyPushConfigRequest, Google::Protobuf::Empty
99
- # Lists the existing snapshots.
100
- rpc :ListSnapshots, ListSnapshotsRequest, ListSnapshotsResponse
101
- # Creates a snapshot from the requested subscription.
102
- # If the snapshot already exists, returns `ALREADY_EXISTS`.
103
- # If the requested subscription doesn't exist, returns `NOT_FOUND`.
104
- #
105
- # If the name is not provided in the request, the server will assign a random
106
- # name for this snapshot on the same project as the subscription, conforming
107
- # to the
108
- # [resource name format](https://cloud.google.com/pubsub/docs/overview#names).
109
- # The generated name is populated in the returned Snapshot object.
110
- # Note that for REST API requests, you must specify a name in the request.
111
- rpc :CreateSnapshot, CreateSnapshotRequest, Snapshot
112
- # Removes an existing snapshot. All messages retained in the snapshot
113
- # are immediately dropped. After a snapshot is deleted, a new one may be
114
- # created with the same name, but the new one has no association with the old
115
- # snapshot or its subscription, unless the same subscription is specified.
116
- rpc :DeleteSnapshot, DeleteSnapshotRequest, Google::Protobuf::Empty
117
- # Seeks an existing subscription to a point in time or to a given snapshot,
118
- # whichever is provided in the request.
119
- rpc :Seek, SeekRequest, SeekResponse
120
- end
121
-
122
- Stub = Service.rpc_stub_class
123
- end
124
- module Publisher
125
- # The service that an application uses to manipulate topics, and to send
126
- # messages to a topic.
127
- class Service
128
-
129
- include GRPC::GenericService
130
-
131
- self.marshal_class_method = :encode
132
- self.unmarshal_class_method = :decode
133
- self.service_name = 'google.pubsub.v1.Publisher'
134
-
135
- # Creates the given topic with the given name.
136
- rpc :CreateTopic, Topic, Topic
137
- # Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
138
- # does not exist. The message payload must not be empty; it must contain
139
- # either a non-empty data field, or at least one attribute.
140
- rpc :Publish, PublishRequest, PublishResponse
141
- # Gets the configuration of a topic.
142
- rpc :GetTopic, GetTopicRequest, Topic
143
- # Lists matching topics.
144
- rpc :ListTopics, ListTopicsRequest, ListTopicsResponse
145
- # Lists the name of the subscriptions for this topic.
146
- rpc :ListTopicSubscriptions, ListTopicSubscriptionsRequest, ListTopicSubscriptionsResponse
147
- # Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
148
- # does not exist. After a topic is deleted, a new topic may be created with
149
- # the same name; this is an entirely new topic with none of the old
150
- # configuration or subscriptions. Existing subscriptions to this topic are
151
- # not deleted, but their `topic` field is set to `_deleted-topic_`.
152
- rpc :DeleteTopic, DeleteTopicRequest, Google::Protobuf::Empty
153
- end
154
-
155
- Stub = Service.rpc_stub_class
156
- end
157
- end
158
- end
159
- end