You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by li...@apache.org on 2022/04/24 07:31:42 UTC
[rocketmq-apis] branch v2 updated: Externalize backoff configuration for retries
This is an automated email from the ASF dual-hosted git repository.
lizhanhui pushed a commit to branch v2
in repository https://gitbox.apache.org/repos/asf/rocketmq-apis.git
The following commit(s) were added to refs/heads/v2 by this push:
new 71f65c3 Externalize backoff configuration for retries
71f65c3 is described below
commit 71f65c302e285b9000337df6c49b79657e79cb83
Author: Li Zhanhui <li...@gmail.com>
AuthorDate: Sun Apr 24 15:31:33 2022 +0800
Externalize backoff configuration for retries
---
.gitignore | 3 ++-
apache/rocketmq/v2/service.proto | 42 +++++++++++++++++++++-------------------
2 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/.gitignore b/.gitignore
index 20af2af..55dbf68 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
bazel-bin
bazel-out
bazel-rocketmq-apis
-bazel-testlogs
\ No newline at end of file
+bazel-testlogs
+.idea
\ No newline at end of file
diff --git a/apache/rocketmq/v2/service.proto b/apache/rocketmq/v2/service.proto
index 34c48d3..b9cf533 100644
--- a/apache/rocketmq/v2/service.proto
+++ b/apache/rocketmq/v2/service.proto
@@ -185,21 +185,17 @@ message Publishing {
// List of topics to which messages will publish to.
repeated Resource topics = 1;
- // If publishing of messages encounters throttle, producer clients shall
- // apply backoff according to `retry_policy`
- RetryPolicy retry_policy = 2;
-
// Publishing settings below here are from server, it is essential for
// server to push.
//
// Body of message will be deflated if its size in bytes exceeds the
// threshold.
- int32 compress_body_threshold = 3;
+ int32 compress_body_threshold = 2;
// If the message body size exceeds `max_body_size`, broker servers would
// reject the request. As a result, it is advisable that Producer performs
// client-side check validation.
- int32 max_body_size = 4;
+ int32 max_body_size = 3;
}
message Subscription {
@@ -222,33 +218,39 @@ message Subscription {
// ones are completely acknowledged.
optional bool fifo = 3;
- // When processing message fails, `backoff_policy` describes an interval
- // after which the message is ready to consume again.
- //
- // For FIFO messages, the interval should be relatively small because
- // messages of the same message group would not be readily available utill
- // the prior one depletes its lifecycle.
- optional RetryPolicy backoff_policy = 4;
-
// Message receive batch size here is essential for push consumer.
- optional int32 receive_batch_size = 5;
+ optional int32 receive_batch_size = 4;
// Long-polling timeout for `ReceiveMessageRequest`, which is essential for
// push consumer.
- optional google.protobuf.Duration long_polling_timeout = 6;
+ optional google.protobuf.Duration long_polling_timeout = 5;
}
message Settings {
- // Common settings for all kind of clients.
+ // Configurations for all clients.
optional ClientType client_type = 1;
+
optional Endpoints access_point = 2;
+ // If publishing of messages encounters throttling or server internal errors,
+ // publishers should implement automatic retries after progressive longer
+ // back-offs for consecutive errors.
+ //
+ // When processing message fails, `backoff_policy` describes an interval
+ // after which the message should be available to consume again.
+ //
+ // For FIFO messages, the interval should be relatively small because
+ // messages of the same message group would not be readily available utill
+ // the prior one depletes its lifecycle.
+ RetryPolicy backoff_policy = 3;
+
// Request timeout for RPCs excluding long-polling.
- optional google.protobuf.Duration request_timeout = 3;
+ optional google.protobuf.Duration request_timeout = 4;
oneof pub_sub {
- Publishing publishing = 4;
- Subscription subscription = 5;
+ Publishing publishing = 5;
+
+ Subscription subscription = 6;
}
}