aboutsummaryrefslogtreecommitdiffstats
path: root/ydb/public/api/grpc/draft/ydb_topic_v1.proto
blob: d3bb31046ab351c55910e3382b82ff6cf960df43 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
syntax = "proto3";
option cc_enable_arenas = true;

package Ydb.Topic.V1;

option java_package = "com.yandex.ydb.topic.v1";

import "ydb/public/api/protos/ydb_topic.proto";

service TopicService {
    // Create Write Session
    // Pipeline example:
    // client                  server
    //         InitRequest(Topic, MessageGroupID, ...)
    //        ---------------->
    //         InitResponse(Partition, MaxSeqNo, ...)
    //        <----------------
    //         WriteRequest(data1, seqNo1)
    //        ---------------->
    //         WriteRequest(data2, seqNo2)
    //        ---------------->
    //         WriteResponse(seqNo1, offset1, ...)
    //        <----------------
    //         WriteRequest(data3, seqNo3)
    //        ---------------->
    //         WriteResponse(seqNo2, offset2, ...)
    //        <----------------
    //         [something went wrong] (status != SUCCESS, issues not empty)
    //        <----------------
    rpc StreamWrite(stream StreamWriteClientMessage) returns (stream StreamWriteServerMessage);


    // Create Read Session
    // Pipeline:
    // client                  server
    //         InitRequest(Topics, ClientId, ...)
    //        ---------------->
    //         InitResponse(SessionId)
    //        <----------------
    //         ReadRequest
    //        ---------------->
    //         ReadRequest
    //        ---------------->
    //         StartPartitionSessionRequest(Topic1, Partition1, PartitionSessionID1, ...)
    //        <----------------
    //         StartPartitionSessionRequest(Topic2, Partition2, PartitionSessionID2, ...)
    //        <----------------
    //         StartPartitionSessionResponse(PartitionSessionID1, ...) - client must respond with this message to actually start recieving data messages from this partition
    //        ---------------->
    //         StopPartitionSessionRequest(PartitionSessionID1, ...)
    //        <----------------
    //         StopPartitionSessionResponse(PartitionSessionID1, ...) - only after this response server will give this parittion to other session.
    //        ---------------->
    //         StartPartitionSessionResponse(PartitionSession2, ...)
    //        ---------------->
    //         ReadResponse(data, ...)
    //        <----------------
    //         CommitRequest(PartitionCommit1, ...)
    //        ---------------->
    //         CommitResponse(PartitionCommitAck1, ...)
    //        <----------------
    //         [something went wrong] (status != SUCCESS, issues not empty)
    //        <----------------
    rpc StreamRead(stream StreamReadClientMessage) returns (stream StreamReadServerMessage);


    // Describe topic command.
    rpc DescribeTopic(DescribeTopicRequest) returns (DescribeTopicResponse);


    // Drop topic command.
    rpc DropTopic(DropTopicRequest) returns (DropTopicResponse);


    // Create topic command.
    rpc CreateTopic(CreateTopicRequest) returns (CreateTopicResponse);


    // Alter topic command.
    rpc AlterTopic(AlterTopicRequest) returns (AlterTopicResponse);


    // Add consumer command.
    rpc AddConsumer(AddConsumerRequest) returns (AddConsumerResponse);


    // Remove consumer command.
    rpc RemoveConsumer(RemoveConsumerRequest) returns (RemoveConsumerResponse);
}