2020-02-27 16:07:13 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package queue_pb;
|
|
|
|
|
|
|
|
option java_package = "seaweedfs.client";
|
|
|
|
option java_outer_classname = "QueueProto";
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
|
|
|
service SeaweedQueue {
|
|
|
|
|
|
|
|
rpc StreamWrite (stream WriteMessageRequest) returns (stream WriteMessageResponse) {
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc StreamRead (ReadMessageRequest) returns (stream ReadMessageResponse) {
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc ConfigureTopic (ConfigureTopicRequest) returns (ConfigureTopicResponse) {
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc DeleteTopic (DeleteTopicRequest) returns (DeleteTopicResponse) {
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
message WriteMessageRequest {
|
|
|
|
string topic = 1;
|
|
|
|
int64 event_ns = 2;
|
2020-03-02 14:13:15 +08:00
|
|
|
bytes partition_key = 3;
|
|
|
|
bytes data = 4;
|
2020-02-27 16:07:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message WriteMessageResponse {
|
|
|
|
string error = 1;
|
|
|
|
int64 ack_ns = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ReadMessageRequest {
|
|
|
|
string topic = 1;
|
|
|
|
int64 start_ns = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ReadMessageResponse {
|
|
|
|
string error = 1;
|
|
|
|
int64 event_ns = 2;
|
|
|
|
bytes data = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ConfigureTopicRequest {
|
|
|
|
string topic = 1;
|
|
|
|
int64 ttl_seconds = 2;
|
2020-03-02 14:13:15 +08:00
|
|
|
int32 partition_count = 3;
|
2020-02-27 16:07:13 +08:00
|
|
|
}
|
|
|
|
message ConfigureTopicResponse {
|
|
|
|
string error = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DeleteTopicRequest {
|
|
|
|
string topic = 1;
|
|
|
|
}
|
|
|
|
message DeleteTopicResponse {
|
|
|
|
string error = 1;
|
|
|
|
}
|