|
|
|
@ -1,4 +1,4 @@ |
|
|
|
|
// Copyright (c) 2015, Google Inc. |
|
|
|
|
// Copyright 2016 Google Inc. |
|
|
|
|
// |
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
|
// you may not use this file except in compliance with the License. |
|
|
|
@ -20,21 +20,22 @@ import "google/api/annotations.proto"; |
|
|
|
|
import "google/protobuf/empty.proto"; |
|
|
|
|
import "google/protobuf/timestamp.proto"; |
|
|
|
|
|
|
|
|
|
option cc_enable_arenas = true; |
|
|
|
|
option java_multiple_files = true; |
|
|
|
|
option java_outer_classname = "PubsubProto"; |
|
|
|
|
option java_package = "com.google.pubsub.v1"; |
|
|
|
|
|
|
|
|
|
option go_package = "google.golang.org/genproto/googleapis/pubsub/v1"; |
|
|
|
|
|
|
|
|
|
// The service that an application uses to manipulate subscriptions and to |
|
|
|
|
// consume messages from a subscription via the `Pull` method. |
|
|
|
|
service Subscriber { |
|
|
|
|
// Creates a subscription to a given topic for a given subscriber. |
|
|
|
|
// Creates a subscription to a given topic. |
|
|
|
|
// If the subscription already exists, returns `ALREADY_EXISTS`. |
|
|
|
|
// If the corresponding topic doesn't exist, returns `NOT_FOUND`. |
|
|
|
|
// |
|
|
|
|
// 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. Note that |
|
|
|
|
// for REST API requests, you must specify a name. |
|
|
|
|
rpc CreateSubscription(Subscription) returns (Subscription) { |
|
|
|
|
option (google.api.http) = { put: "/v1/{name=projects/*/subscriptions/*}" body: "*" }; |
|
|
|
|
} |
|
|
|
@ -61,7 +62,8 @@ service Subscriber { |
|
|
|
|
// 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, or to make the message available for redelivery if the |
|
|
|
|
// processing was interrupted. |
|
|
|
|
// processing was interrupted. Note that this does not modify the |
|
|
|
|
// subscription-level `ackDeadlineSeconds` used for subsequent messages. |
|
|
|
|
rpc ModifyAckDeadline(ModifyAckDeadlineRequest) returns (google.protobuf.Empty) { |
|
|
|
|
option (google.api.http) = { post: "/v1/{subscription=projects/*/subscriptions/*}:modifyAckDeadline" body: "*" }; |
|
|
|
|
} |
|
|
|
@ -151,7 +153,7 @@ message Topic { |
|
|
|
|
// it must contain either a non-empty data field, or at least one attribute. |
|
|
|
|
message PubsubMessage { |
|
|
|
|
// The message payload. For JSON requests, the value of this field must be |
|
|
|
|
// base64-encoded. |
|
|
|
|
// [base64-encoded](https://tools.ietf.org/html/rfc4648). |
|
|
|
|
bytes data = 1; |
|
|
|
|
|
|
|
|
|
// Optional attributes for this message. |
|
|
|
@ -277,6 +279,7 @@ message Subscription { |
|
|
|
|
// deadline. To override this value for a given message, call |
|
|
|
|
// `ModifyAckDeadline` with the corresponding `ack_id` if using |
|
|
|
|
// pull. |
|
|
|
|
// The maximum custom deadline you can specify is 600 seconds (10 minutes). |
|
|
|
|
// |
|
|
|
|
// For push delivery, this value is also used to set the request timeout for |
|
|
|
|
// the call to the push endpoint. |
|
|
|
@ -284,7 +287,7 @@ message Subscription { |
|
|
|
|
// If the subscriber never acknowledges the message, the Pub/Sub |
|
|
|
|
// system will eventually redeliver the message. |
|
|
|
|
// |
|
|
|
|
// If this parameter is not set, the default value of 10 seconds is used. |
|
|
|
|
// If this parameter is 0, a default value of 10 seconds is used. |
|
|
|
|
int32 ack_deadline_seconds = 5; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|