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
|
syntax = "proto3";
package NPersQueue;
option java_package = "com.yandex.persqueue";
option java_outer_classname = "PersqueueGrpc";
import "kikimr/yndx/api/protos/persqueue.proto";
service PersQueueService {
/**
* Creates Write Session
* Pipeline:
* client server
* Init(Topic, SourceId, ...)
* ---------------->
* Init(Partition, MaxSeqNo, ...)
* <----------------
* write(data1, seqNo1)
* ---------------->
* write(data2, seqNo2)
* ---------------->
* ack(seqNo1, offset1, ...)
* <----------------
* write(data3, seqNo3)
* ---------------->
* ack(seqNo2, offset2, ...)
* <----------------
* error(description, errorCode)
* <----------------
*/
rpc WriteSession(stream WriteRequest) returns (stream WriteResponse);
/**
* Creates Read Session
* Pipeline:
* client server
* Init(Topics, ClientId, ...)
* ---------------->
* Init(SessionId)
* <----------------
* read1
* ---------------->
* read2
* ---------------->
* lock(Topic1,Partition1, ...) - locks and releases are optional
* <----------------
* lock(Topic2, Partition2, ...)
* <----------------
* release(Topic1, Partition1, ...)
* <----------------
* locked(Topic2, Partition2, ...) - client must respond to lock request with this message. Only after this client will start recieving messages from this partition
* ---------------->
* read result(data, ...)
* <----------------
* commit(cookie1)
* ---------------->
* commit result(cookie1)
* <----------------
* error(description, errorCode)
* <----------------
*/
rpc ReadSession(stream ReadRequest) returns (stream ReadResponse);
}
|