-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsmq.proto
79 lines (58 loc) · 1.58 KB
/
smq.proto
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
syntax = "proto3";
package smq;
option go_package = "./proto";
service SuhaibMessageQueue {
rpc Connect (ConnectRequest) returns (ConnectResponse) {}
rpc GetLatestOffset (GetLatestOffsetRequest) returns (GetLatestOffsetResponse) {}
rpc GetEarliestOffset (GetEarliestOffsetRequest) returns (GetEarliestOffsetResponse) {}
rpc CreateTopic (CreateTopicRequest) returns (CreateTopicResponse) {}
// Single message versions
rpc Produce (ProduceRequest) returns (ProduceResponse) {}
rpc Consume (ConsumeRequest) returns (ConsumeResponse) {}
// Stream versions
rpc StreamProduce (stream ProduceRequest) returns (ProduceResponse) {}
rpc StreamConsume (ConsumeRequest) returns (stream ConsumeResponse) {}
rpc DeleteUntilOffset (DeleteUntilOffsetRequest) returns (DeleteUntilOffsetResponse) {}
}
message ConnectRequest {
}
message ConnectResponse {
}
message GetLatestOffsetRequest {
string topic = 1;
}
message GetLatestOffsetResponse {
int64 offset = 1;
}
message GetEarliestOffsetRequest {
string topic = 1;
}
message GetEarliestOffsetResponse {
int64 offset = 1;
}
message CreateTopicRequest {
string topic = 1;
}
message CreateTopicResponse {
}
message ProduceRequest {
string topic = 1;
bytes message = 2;
}
message ProduceResponse {
int64 offset = 1;
}
message ConsumeRequest {
string topic = 1;
int64 offset = 2;
}
message ConsumeResponse {
bytes message = 1;
int64 offset = 2;
}
message DeleteUntilOffsetRequest {
string topic = 1;
int64 offset = 2;
}
message DeleteUntilOffsetResponse {
}