123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- syntax = "proto3";
- package google.cloud.pubsublite.v1;
- import "google/api/annotations.proto";
- import "google/api/client.proto";
- import "google/api/field_behavior.proto";
- import "google/cloud/pubsublite/v1/common.proto";
- option cc_enable_arenas = true;
- option csharp_namespace = "Google.Cloud.PubSubLite.V1";
- option go_package = "google.golang.org/genproto/googleapis/cloud/pubsublite/v1;pubsublite";
- option java_multiple_files = true;
- option java_outer_classname = "SubscriberProto";
- option java_package = "com.google.cloud.pubsublite.proto";
- option php_namespace = "Google\\Cloud\\PubSubLite\\V1";
- option ruby_package = "Google::Cloud::PubSubLite::V1";
- service SubscriberService {
- option (google.api.default_host) = "pubsublite.googleapis.com";
- option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
-
- rpc Subscribe(stream SubscribeRequest) returns (stream SubscribeResponse) {
- }
- }
- // The service that a subscriber client application uses to determine which
- // partitions it should connect to.
- service PartitionAssignmentService {
- option (google.api.default_host) = "pubsublite.googleapis.com";
- option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
-
-
-
-
-
-
-
- rpc AssignPartitions(stream PartitionAssignmentRequest) returns (stream PartitionAssignment) {
- }
- }
- // The first request that must be sent on a newly-opened stream. The client must
- // wait for the response before sending subsequent requests on the stream.
- message InitialSubscribeRequest {
- // The subscription from which to receive messages.
- string subscription = 1;
-
-
- int64 partition = 2;
-
-
-
- SeekRequest initial_location = 4 [(google.api.field_behavior) = OPTIONAL];
- }
- message InitialSubscribeResponse {
-
-
- Cursor cursor = 1;
- }
- message SeekRequest {
-
- enum NamedTarget {
-
- NAMED_TARGET_UNSPECIFIED = 0;
-
-
- HEAD = 1;
-
-
- COMMITTED_CURSOR = 2;
- }
-
- oneof target {
-
- NamedTarget named_target = 1;
-
-
- Cursor cursor = 2;
- }
- }
- message SeekResponse {
-
- Cursor cursor = 1;
- }
- message FlowControlRequest {
-
- int64 allowed_messages = 1;
-
- int64 allowed_bytes = 2;
- }
- message SubscribeRequest {
-
- oneof request {
-
- InitialSubscribeRequest initial = 1;
-
- SeekRequest seek = 2;
-
- FlowControlRequest flow_control = 3;
- }
- }
- message MessageResponse {
-
- repeated SequencedMessage messages = 1;
- }
- message SubscribeResponse {
-
- oneof response {
-
- InitialSubscribeResponse initial = 1;
-
- SeekResponse seek = 2;
-
- MessageResponse messages = 3;
- }
- }
- message InitialPartitionAssignmentRequest {
-
-
-
- string subscription = 1;
-
-
-
-
-
-
-
-
- bytes client_id = 2;
- }
- message PartitionAssignment {
-
- repeated int64 partitions = 1;
- }
- message PartitionAssignmentAck {
- }
- message PartitionAssignmentRequest {
-
- oneof request {
-
- InitialPartitionAssignmentRequest initial = 1;
-
- PartitionAssignmentAck ack = 2;
- }
- }
|