[Streaming]Streaming queue support failover (#8161)

This commit is contained in:
wanxing
2020-08-25 14:19:45 +08:00
committed by GitHub
parent 5a787a8253
commit e816e3aefb
16 changed files with 1049 additions and 212 deletions
+43 -15
View File
@@ -9,41 +9,45 @@ enum StreamingQueueMessageType {
StreamingQueueNotificationMsgType = 3;
StreamingQueueTestInitMsgType = 4;
StreamingQueueTestCheckStatusRspMsgType = 5;
StreamingQueuePullRequestMsgType = 6;
StreamingQueuePullResponseMsgType = 7;
StreamingQueueResendDataMsgType = 8;
}
enum StreamingQueueError {
OK = 0;
QUEUE_NOT_EXIST = 1;
NO_VALID_DATA_TO_PULL = 2;
DATA_LOST = 2;
NO_VALID_DATA = 3;
}
message StreamingQueueDataMsg {
message MessageCommon {
bytes src_actor_id = 1;
bytes dst_actor_id = 2;
bytes queue_id = 3;
uint64 seq_id = 4;
}
message StreamingQueueDataMsg {
MessageCommon common = 1;
uint64 seq_id = 2;
uint64 msg_id_start = 3;
uint64 msg_id_end = 4;
uint64 length = 5;
bool raw = 6;
}
message StreamingQueueCheckMsg {
bytes src_actor_id = 1;
bytes dst_actor_id = 2;
bytes queue_id = 3;
MessageCommon common = 1;
}
message StreamingQueueCheckRspMsg {
bytes src_actor_id = 1;
bytes dst_actor_id = 2;
bytes queue_id = 3;
StreamingQueueError err_code = 4;
MessageCommon common = 1;
StreamingQueueError err_code = 2;
}
message StreamingQueueNotificationMsg {
bytes src_actor_id = 1;
bytes dst_actor_id = 2;
bytes queue_id = 3;
uint64 seq_id = 4;
MessageCommon common = 1;
uint64 seq_id = 2;
}
// for test
@@ -67,4 +71,28 @@ message StreamingQueueTestInitMsg {
message StreamingQueueTestCheckStatusRspMsg {
string test_name = 1;
bool status = 2;
}
}
message StreamingQueuePullRequestMsg {
MessageCommon common = 1;
uint64 msg_id = 2;
}
message StreamingQueuePullResponseMsg {
MessageCommon common = 1;
uint64 seq_id = 2;
uint64 msg_id = 3;
StreamingQueueError err_code = 4;
bool is_upstream_first_pull = 5;
}
message StreamingQueueResendDataMsg {
MessageCommon common = 1;
uint64 first_seq_id = 2;
uint64 last_seq_id = 3;
uint64 seq_id = 4;
uint64 msg_id_start = 5;
uint64 msg_id_end = 6;
uint64 length = 7;
bool raw = 8;
}