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.

66 lines
1.2 KiB

5 years ago
5 years ago
  1. syntax = "proto3";
  2. package queue_pb;
  3. option java_package = "seaweedfs.client";
  4. option java_outer_classname = "QueueProto";
  5. //////////////////////////////////////////////////
  6. service SeaweedQueue {
  7. rpc StreamWrite (stream WriteMessageRequest) returns (stream WriteMessageResponse) {
  8. }
  9. rpc StreamRead (ReadMessageRequest) returns (stream ReadMessageResponse) {
  10. }
  11. rpc ConfigureTopic (ConfigureTopicRequest) returns (ConfigureTopicResponse) {
  12. }
  13. rpc DeleteTopic (DeleteTopicRequest) returns (DeleteTopicResponse) {
  14. }
  15. }
  16. //////////////////////////////////////////////////
  17. message WriteMessageRequest {
  18. string topic = 1;
  19. int64 event_ns = 2;
  20. bytes partition_key = 3;
  21. bytes data = 4;
  22. }
  23. message WriteMessageResponse {
  24. string error = 1;
  25. int64 ack_ns = 2;
  26. }
  27. message ReadMessageRequest {
  28. string topic = 1;
  29. int64 start_ns = 2;
  30. }
  31. message ReadMessageResponse {
  32. string error = 1;
  33. int64 event_ns = 2;
  34. bytes data = 3;
  35. }
  36. message ConfigureTopicRequest {
  37. string topic = 1;
  38. int64 ttl_seconds = 2;
  39. int32 partition_count = 3;
  40. }
  41. message ConfigureTopicResponse {
  42. string error = 1;
  43. }
  44. message DeleteTopicRequest {
  45. string topic = 1;
  46. }
  47. message DeleteTopicResponse {
  48. string error = 1;
  49. }