|
|
@ -16,6 +16,7 @@ syntax = "proto3"; |
|
|
|
|
|
|
|
|
|
|
|
package google.pubsub.v1; |
|
|
|
package google.pubsub.v1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import "google/api/annotations.proto"; |
|
|
|
import "google/protobuf/empty.proto"; |
|
|
|
import "google/protobuf/empty.proto"; |
|
|
|
|
|
|
|
|
|
|
|
option java_multiple_files = true; |
|
|
|
option java_multiple_files = true; |
|
|
@ -32,26 +33,36 @@ service Subscriber { |
|
|
|
// |
|
|
|
// |
|
|
|
// If the name is not provided in the request, the server will assign a random |
|
|
|
// If the name is not provided in the request, the server will assign a random |
|
|
|
// name for this subscription on the same project as the topic. |
|
|
|
// name for this subscription on the same project as the topic. |
|
|
|
rpc CreateSubscription(Subscription) returns (Subscription); |
|
|
|
rpc CreateSubscription(Subscription) returns (Subscription) { |
|
|
|
|
|
|
|
option (google.api.http) = { put: "/v1/{name=projects/*/subscriptions/*}" body: "*" }; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Gets the configuration details of a subscription. |
|
|
|
// Gets the configuration details of a subscription. |
|
|
|
rpc GetSubscription(GetSubscriptionRequest) returns (Subscription); |
|
|
|
rpc GetSubscription(GetSubscriptionRequest) returns (Subscription) { |
|
|
|
|
|
|
|
option (google.api.http) = { get: "/v1/{subscription=projects/*/subscriptions/*}" }; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Lists matching subscriptions. |
|
|
|
// Lists matching subscriptions. |
|
|
|
rpc ListSubscriptions(ListSubscriptionsRequest) returns (ListSubscriptionsResponse); |
|
|
|
rpc ListSubscriptions(ListSubscriptionsRequest) returns (ListSubscriptionsResponse) { |
|
|
|
|
|
|
|
option (google.api.http) = { get: "/v1/{project=projects/*}/subscriptions" }; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Deletes an existing subscription. All pending messages in the subscription |
|
|
|
// Deletes an existing subscription. All pending messages in the subscription |
|
|
|
// are immediately dropped. Calls to Pull after deletion will return |
|
|
|
// are immediately dropped. Calls to Pull after deletion will return |
|
|
|
// NOT_FOUND. After a subscription is deleted, a new one may be created with |
|
|
|
// NOT_FOUND. After a subscription is deleted, a new one may be created with |
|
|
|
// the same name, but the new one has no association with the old |
|
|
|
// the same name, but the new one has no association with the old |
|
|
|
// subscription, or its topic unless the same topic is specified. |
|
|
|
// subscription, or its topic unless the same topic is specified. |
|
|
|
rpc DeleteSubscription(DeleteSubscriptionRequest) returns (google.protobuf.Empty); |
|
|
|
rpc DeleteSubscription(DeleteSubscriptionRequest) returns (google.protobuf.Empty) { |
|
|
|
|
|
|
|
option (google.api.http) = { delete: "/v1/{subscription=projects/*/subscriptions/*}" }; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Modifies the ack deadline for a specific message. This method is useful to |
|
|
|
// Modifies the ack deadline for a specific message. This method is useful to |
|
|
|
// indicate that more time is needed to process a message by the subscriber, |
|
|
|
// indicate that more time is needed to process a message by the subscriber, |
|
|
|
// or to make the message available for redelivery if the processing was |
|
|
|
// or to make the message available for redelivery if the processing was |
|
|
|
// interrupted. |
|
|
|
// interrupted. |
|
|
|
rpc ModifyAckDeadline(ModifyAckDeadlineRequest) returns (google.protobuf.Empty); |
|
|
|
rpc ModifyAckDeadline(ModifyAckDeadlineRequest) returns (google.protobuf.Empty) { |
|
|
|
|
|
|
|
option (google.api.http) = { post: "/v1/{subscription=projects/*/subscriptions/*}:modifyAckDeadline" body: "*" }; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Acknowledges the messages associated with the ack tokens in the |
|
|
|
// Acknowledges the messages associated with the ack tokens in the |
|
|
|
// AcknowledgeRequest. The Pub/Sub system can remove the relevant messages |
|
|
|
// AcknowledgeRequest. The Pub/Sub system can remove the relevant messages |
|
|
@ -60,13 +71,17 @@ service Subscriber { |
|
|
|
// Acknowledging a message whose ack deadline has expired may succeed, |
|
|
|
// Acknowledging a message whose ack deadline has expired may succeed, |
|
|
|
// but such a message may be redelivered later. Acknowledging a message more |
|
|
|
// but such a message may be redelivered later. Acknowledging a message more |
|
|
|
// than once will not result in an error. |
|
|
|
// than once will not result in an error. |
|
|
|
rpc Acknowledge(AcknowledgeRequest) returns (google.protobuf.Empty); |
|
|
|
rpc Acknowledge(AcknowledgeRequest) returns (google.protobuf.Empty) { |
|
|
|
|
|
|
|
option (google.api.http) = { post: "/v1/{subscription=projects/*/subscriptions/*}:acknowledge" body: "*" }; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Pulls messages from the server. Returns an empty list if there are no |
|
|
|
// Pulls messages from the server. Returns an empty list if there are no |
|
|
|
// messages available in the backlog. The server may return UNAVAILABLE if |
|
|
|
// messages available in the backlog. The server may return UNAVAILABLE if |
|
|
|
// there are too many concurrent pull requests pending for the given |
|
|
|
// there are too many concurrent pull requests pending for the given |
|
|
|
// subscription. |
|
|
|
// subscription. |
|
|
|
rpc Pull(PullRequest) returns (PullResponse); |
|
|
|
rpc Pull(PullRequest) returns (PullResponse) { |
|
|
|
|
|
|
|
option (google.api.http) = { post: "/v1/{subscription=projects/*/subscriptions/*}:pull" body: "*" }; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Modifies the PushConfig for a specified subscription. |
|
|
|
// Modifies the PushConfig for a specified subscription. |
|
|
|
// |
|
|
|
// |
|
|
@ -75,34 +90,49 @@ service Subscriber { |
|
|
|
// attributes of a push subscription. Messages will accumulate for |
|
|
|
// attributes of a push subscription. Messages will accumulate for |
|
|
|
// delivery continuously through the call regardless of changes to the |
|
|
|
// delivery continuously through the call regardless of changes to the |
|
|
|
// PushConfig. |
|
|
|
// PushConfig. |
|
|
|
rpc ModifyPushConfig(ModifyPushConfigRequest) returns (google.protobuf.Empty); |
|
|
|
rpc ModifyPushConfig(ModifyPushConfigRequest) returns (google.protobuf.Empty) { |
|
|
|
|
|
|
|
option (google.api.http) = { post: "/v1/{subscription=projects/*/subscriptions/*}:modifyPushConfig" body: "*" }; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// The service that an application uses to manipulate topics, and to send |
|
|
|
// The service that an application uses to manipulate topics, and to send |
|
|
|
// messages to a topic. |
|
|
|
// messages to a topic. |
|
|
|
service Publisher { |
|
|
|
service Publisher { |
|
|
|
// Creates the given topic with the given name. |
|
|
|
// Creates the given topic with the given name. |
|
|
|
rpc CreateTopic(Topic) returns (Topic); |
|
|
|
rpc CreateTopic(Topic) returns (Topic) { |
|
|
|
|
|
|
|
option (google.api.http) = { put: "/v1/{name=projects/*/topics/*}" body: "*" }; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Adds one or more messages to the topic. Returns NOT_FOUND if the topic does |
|
|
|
// Adds one or more messages to the topic. Returns NOT_FOUND if the topic does |
|
|
|
// not exist. |
|
|
|
// not exist. The message payload must not be empty; it must contain either a |
|
|
|
rpc Publish(PublishRequest) returns (PublishResponse); |
|
|
|
// non-empty data field, or at least one attribute. |
|
|
|
|
|
|
|
rpc Publish(PublishRequest) returns (PublishResponse) { |
|
|
|
|
|
|
|
option (google.api.http) = { post: "/v1/{topic=projects/*/topics/*}:publish" body: "*" }; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Gets the configuration of a topic. |
|
|
|
// Gets the configuration of a topic. |
|
|
|
rpc GetTopic(GetTopicRequest) returns (Topic); |
|
|
|
rpc GetTopic(GetTopicRequest) returns (Topic) { |
|
|
|
|
|
|
|
option (google.api.http) = { get: "/v1/{topic=projects/*/topics/*}" }; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Lists matching topics. |
|
|
|
// Lists matching topics. |
|
|
|
rpc ListTopics(ListTopicsRequest) returns (ListTopicsResponse); |
|
|
|
rpc ListTopics(ListTopicsRequest) returns (ListTopicsResponse) { |
|
|
|
|
|
|
|
option (google.api.http) = { get: "/v1/{project=projects/*}/topics" }; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Lists the name of the subscriptions for this topic. |
|
|
|
// Lists the name of the subscriptions for this topic. |
|
|
|
rpc ListTopicSubscriptions(ListTopicSubscriptionsRequest) returns (ListTopicSubscriptionsResponse); |
|
|
|
rpc ListTopicSubscriptions(ListTopicSubscriptionsRequest) returns (ListTopicSubscriptionsResponse) { |
|
|
|
|
|
|
|
option (google.api.http) = { get: "/v1/{topic=projects/*/topics/*}/subscriptions" }; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Deletes the topic with the given name. Returns NOT_FOUND if the topic does |
|
|
|
// Deletes the topic with the given name. Returns NOT_FOUND if the topic does |
|
|
|
// not exist. After a topic is deleted, a new topic may be created with the |
|
|
|
// not exist. After a topic is deleted, a new topic may be created with the |
|
|
|
// same name; this is an entirely new topic with none of the old |
|
|
|
// same name; this is an entirely new topic with none of the old |
|
|
|
// configuration or subscriptions. Existing subscriptions to this topic are |
|
|
|
// configuration or subscriptions. Existing subscriptions to this topic are |
|
|
|
// not deleted, but their `topic` field is set to `_deleted-topic_`. |
|
|
|
// not deleted, but their `topic` field is set to `_deleted-topic_`. |
|
|
|
rpc DeleteTopic(DeleteTopicRequest) returns (google.protobuf.Empty); |
|
|
|
rpc DeleteTopic(DeleteTopicRequest) returns (google.protobuf.Empty) { |
|
|
|
|
|
|
|
option (google.api.http) = { delete: "/v1/{topic=projects/*/topics/*}" }; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// A topic resource. |
|
|
|
// A topic resource. |
|
|
@ -116,7 +146,8 @@ message Topic { |
|
|
|
string name = 1; |
|
|
|
string name = 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// A message data and its attributes. |
|
|
|
// A message data and its attributes. The message payload must not be empty; |
|
|
|
|
|
|
|
// it must contain either a non-empty data field, or at least one attribute. |
|
|
|
message PubsubMessage { |
|
|
|
message PubsubMessage { |
|
|
|
// The message payload. For JSON requests, the value of this field must be |
|
|
|
// The message payload. For JSON requests, the value of this field must be |
|
|
|
// base64-encoded. |
|
|
|
// base64-encoded. |
|
|
@ -236,10 +267,9 @@ message Subscription { |
|
|
|
// acknowledged, it is an outstanding message and will not be delivered |
|
|
|
// acknowledged, it is an outstanding message and will not be delivered |
|
|
|
// again during that time (on a best-effort basis). |
|
|
|
// again during that time (on a best-effort basis). |
|
|
|
// |
|
|
|
// |
|
|
|
// For pull delivery this value |
|
|
|
// For pull delivery this value is used as the initial value for the ack |
|
|
|
// is used as the initial value for the ack deadline. It may be overridden |
|
|
|
// deadline. To override this value for a given message, call |
|
|
|
// for each message using its corresponding ack_id by calling |
|
|
|
// ModifyAckDeadline with the corresponding ack_id. |
|
|
|
// ModifyAckDeadline. |
|
|
|
|
|
|
|
// |
|
|
|
// |
|
|
|
// For push delivery, this value is also used to set the request timeout for |
|
|
|
// For push delivery, this value is also used to set the request timeout for |
|
|
|
// the call to the push endpoint. |
|
|
|
// the call to the push endpoint. |
|
|
@ -247,7 +277,7 @@ message Subscription { |
|
|
|
// If the subscriber never acknowledges the message, the Pub/Sub |
|
|
|
// If the subscriber never acknowledges the message, the Pub/Sub |
|
|
|
// system will eventually redeliver the message. |
|
|
|
// system will eventually redeliver the message. |
|
|
|
// |
|
|
|
// |
|
|
|
// If this parameter is not set, the default value of 60 seconds is used. |
|
|
|
// If this parameter is not set, the default value of 10 seconds is used. |
|
|
|
int32 ack_deadline_seconds = 5; |
|
|
|
int32 ack_deadline_seconds = 5; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|