You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/10/04 06:57:11 UTC

[GitHub] [rocketmq-apis] drpmma commented on a change in pull request #1: Init first draft version of rocketmq new apis

drpmma commented on a change in pull request #1:
URL: https://github.com/apache/rocketmq-apis/pull/1#discussion_r721086710



##########
File path: apache/rocketmq/v1/service.proto
##########
@@ -0,0 +1,424 @@
+syntax = "proto3";
+
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/error_details.proto";
+import "google/rpc/status.proto";
+
+import "apache/rocketmq/v1/definition.proto";
+
+package apache.rocketmq.v1;
+
+option java_multiple_files = true;
+option java_package = "apache.rocketmq.v1";
+option java_generate_equals_and_hash = true;
+option java_string_check_utf8 = true;
+option java_outer_classname = "MQService";
+
+message ResponseCommon {
+  google.rpc.Status status = 1;
+  google.rpc.RequestInfo request_info = 2;
+  google.rpc.Help help = 3;
+  google.rpc.RetryInfo retry_info = 4;
+  google.rpc.DebugInfo debug_info = 5;
+  google.rpc.ErrorInfo error_info = 6;
+
+  reserved 7 to 64;
+}
+
+// A QueryRouteRequest requests a set of Partitions of the specific topic with
+// necessary route infos.
+message QueryRouteRequest {
+  Resource topic = 1;
+
+  // The service access points used to issue QueryRouteRequest
+  // The QueryRouteResponse will indicate the adress of subsequent RPCs.
+  Endpoints endpoints = 2;
+
+  reserved 3 to 64;
+}
+
+message QueryRouteResponse {
+  ResponseCommon common = 1;
+  repeated Partition partitions = 2;
+
+  reserved 3 to 64;
+}
+
+message SendMessageRequest {
+  Message message = 1;
+  Partition partition = 2;
+
+  reserved 3 to 64;
+}
+
+message SendMessageResponse {
+  ResponseCommon common = 1;
+  string message_id = 2;
+  string transaction_id = 3;
+
+  reserved 4 to 64;
+}
+
+message QueryAssignmentRequest {
+  Resource topic = 1;
+  Resource group = 2;
+  string client_id = 3;
+
+  // Service access point
+  Endpoints endpoints = 4;
+
+  reserved 5 to 64;
+}
+
+message QueryAssignmentResponse {
+  ResponseCommon common = 1;
+  repeated Assignment assignments = 2;
+
+  reserved 3 to 64;
+}
+
+message ReceiveMessageRequest {
+  Resource group = 1;
+  string client_id = 2;
+  Partition partition = 3;
+  FilterExpression filter_expression = 4;
+  ConsumePolicy consume_policy = 5;
+  google.protobuf.Timestamp initialization_timestamp = 6;
+  int32 batch_size = 7;
+  google.protobuf.Duration invisible_duration = 8;
+  google.protobuf.Duration await_time = 9;
+  bool fifo_flag = 10;
+
+  reserved 11 to 64;
+}
+
+message ReceiveMessageResponse {
+  ResponseCommon common = 1;
+  repeated Message messages = 2;
+  google.protobuf.Timestamp delivery_timestamp = 3;
+  google.protobuf.Duration invisible_duration = 4;
+
+  reserved 5 to 64;
+}
+
+message AckMessageRequest {
+  Resource group = 1;
+  Resource topic = 2;
+  string client_id = 3;
+  oneof handle {
+    string receipt_handle = 4;
+    int64 offset = 5;
+  }
+  string message_id = 6;
+
+  reserved 7 to 64;
+}
+
+message AckMessageResponse {
+  ResponseCommon common = 1;
+
+  reserved 2 to 64;
+}
+
+message NackMessageRequest {
+  Resource group = 1;
+  Resource topic = 2;
+  string client_id = 3;
+  string receipt_handle = 4;
+  string message_id = 5;
+  int32 delivery_attempt = 6;
+  int32 max_delivery_attempts = 7;
+
+  reserved 8 to 64;
+}
+
+message NackMessageResponse {
+  ResponseCommon common = 1;
+
+  reserved 2 to 64;
+}
+
+message ForwardMessageToDeadLetterQueueRequest {
+  Resource group = 1;
+  Resource topic = 2;
+  string client_id = 3;
+  string receipt_handle = 4;
+  string message_id = 5;
+  int32 delivery_attempt = 6;
+  int32 max_delivery_attempts = 7;
+
+  reserved 8 to 64;
+}
+
+message ForwardMessageToDeadLetterQueueResponse {
+  ResponseCommon common = 1;
+
+  reserved 2 to 64;
+}
+
+message HeartbeatRequest {
+  string client_id = 1;
+  oneof client_data {
+    ProducerData producer_data = 2;
+    ConsumerData consumer_data = 3;
+  }
+  bool fifo_flag = 4;
+
+  reserved 5 to 64;
+}
+
+message HeartbeatResponse {
+  ResponseCommon common = 1;
+
+  reserved 2 to 64;
+}
+
+message HealthCheckRequest {
+  Resource group = 1;
+  string client_host = 2;
+
+  reserved 3 to 64;
+}
+
+message HealthCheckResponse {
+  ResponseCommon common = 1;
+
+  reserved 2 to 64;
+}
+
+message EndTransactionRequest {

Review comment:
       It seems that tranStateTableOffset and commitLogOffset are not included in this protocol.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org