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.

64 lines
1.2 KiB

  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 data = 3;
  21. }
  22. message WriteMessageResponse {
  23. string error = 1;
  24. int64 ack_ns = 2;
  25. }
  26. message ReadMessageRequest {
  27. string topic = 1;
  28. int64 start_ns = 2;
  29. }
  30. message ReadMessageResponse {
  31. string error = 1;
  32. int64 event_ns = 2;
  33. bytes data = 3;
  34. }
  35. message ConfigureTopicRequest {
  36. string topic = 1;
  37. int64 ttl_seconds = 2;
  38. }
  39. message ConfigureTopicResponse {
  40. string error = 1;
  41. }
  42. message DeleteTopicRequest {
  43. string topic = 1;
  44. }
  45. message DeleteTopicResponse {
  46. string error = 1;
  47. }