ask follower to follow
This commit is contained in:
@@ -45,6 +45,11 @@ service SeaweedMessaging {
|
||||
}
|
||||
rpc SubscribeMessage (SubscribeMessageRequest) returns (stream SubscribeMessageResponse) {
|
||||
}
|
||||
// The lead broker asks a follower broker to follow itself
|
||||
rpc PublishFollowMe (PublishFollowMeRequest) returns (PublishFollowMeResponse) {
|
||||
}
|
||||
rpc FollowInMemoryMessages (FollowInMemoryMessagesRequest) returns (stream FollowInMemoryMessagesResponse) {
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
@@ -205,6 +210,14 @@ message PublishMessageResponse {
|
||||
string error = 2;
|
||||
bool should_close = 3;
|
||||
}
|
||||
message PublishFollowMeRequest {
|
||||
Topic topic = 1;
|
||||
Partition partition = 2;
|
||||
string broker_self = 3;
|
||||
}
|
||||
message PublishFollowMeResponse {
|
||||
string error = 1;
|
||||
}
|
||||
message SubscribeMessageRequest {
|
||||
message InitMessage {
|
||||
string consumer_group = 1;
|
||||
@@ -233,6 +246,32 @@ message SubscribeMessageResponse {
|
||||
DataMessage data = 2;
|
||||
}
|
||||
}
|
||||
message FollowInMemoryMessagesRequest {
|
||||
message InitMessage {
|
||||
string consumer_group = 1;
|
||||
string consumer_id = 2;
|
||||
int32 follower_id = 3;
|
||||
Topic topic = 4;
|
||||
PartitionOffset partition_offset = 5;
|
||||
}
|
||||
message AckMessage {
|
||||
int64 sequence = 1;
|
||||
}
|
||||
oneof message {
|
||||
InitMessage init = 1;
|
||||
AckMessage ack = 2;
|
||||
}
|
||||
}
|
||||
message FollowInMemoryMessagesResponse {
|
||||
message CtrlMessage {
|
||||
int64 flushed_sequence = 1;
|
||||
int32 follower_changed_to_id = 2;
|
||||
}
|
||||
oneof message {
|
||||
CtrlMessage ctrl = 1;
|
||||
DataMessage data = 2;
|
||||
}
|
||||
}
|
||||
message ClosePublishersRequest {
|
||||
Topic topic = 1;
|
||||
int64 unix_time_ns = 2;
|
||||
|
||||
Reference in New Issue
Block a user