You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.4 KiB

3 years ago
3 years ago
3 years ago
3 years ago
  1. syntax = "proto3";
  2. package messaging_pb;
  3. option go_package = "github.com/chrislusf/seaweedfs/weed/pb/mq_pb";
  4. option java_package = "seaweedfs.mq";
  5. option java_outer_classname = "MessagQueueProto";
  6. //////////////////////////////////////////////////
  7. service SeaweedMessaging {
  8. rpc FindBrokerLeader (FindBrokerLeaderRequest) returns (FindBrokerLeaderResponse) {
  9. }
  10. rpc AssignSegmentBrokers (AssignSegmentBrokersRequest) returns (AssignSegmentBrokersResponse) {
  11. }
  12. rpc CheckSegmentStatus (CheckSegmentStatusRequest) returns (CheckSegmentStatusResponse) {
  13. }
  14. rpc CheckBrokerLoad (CheckBrokerLoadRequest) returns (CheckBrokerLoadResponse) {
  15. }
  16. }
  17. //////////////////////////////////////////////////
  18. message FindBrokerLeaderRequest {
  19. string filer_group = 1;
  20. }
  21. message FindBrokerLeaderResponse {
  22. string broker = 1;
  23. }
  24. message Partition {
  25. int32 ring_size = 1;
  26. int32 range_start = 2;
  27. int32 range_stop = 3;
  28. }
  29. message Segment {
  30. string namespace = 1;
  31. string topic = 2;
  32. int32 id = 3;
  33. Partition partition = 4;
  34. }
  35. message AssignSegmentBrokersRequest {
  36. Segment segment = 1;
  37. }
  38. message AssignSegmentBrokersResponse {
  39. repeated string brokers = 1;
  40. }
  41. message CheckSegmentStatusRequest {
  42. Segment segment = 1;
  43. }
  44. message CheckSegmentStatusResponse {
  45. bool is_active = 1;
  46. }
  47. message CheckBrokerLoadRequest {
  48. }
  49. message CheckBrokerLoadResponse {
  50. int64 message_count = 1;
  51. int64 bytes_count = 2;
  52. }