Anonymitaet commented on a change in pull request #13709:
URL: https://github.com/apache/pulsar/pull/13709#discussion_r782665029



##########
File path: site2/docs/concepts-messaging.md
##########
@@ -194,16 +194,41 @@ But this is not flexible enough. A better way is to use 
the **redelivery backoff
 If you want to use `Negative Redelivery Backoff`, you can use the following 
API.
 
 ```java
-consumer.negativeAckRedeliveryBackoff(NegativeAckRedeliveryExponentialBackoff.builder()
-        .minNackTimeMs(1000)
-        .maxNackTimeMs(60 * 1000)
+consumer.negativeAckRedeliveryBackoff(ExponentialRedeliveryBackoff.builder()
+        .minDelayMs(1000)
+        .maxDelayMs(60 * 1000)
         .build())
 ```
 
 ### Acknowledgement timeout
 
 If a message is not consumed successfully, and you want the broker to 
redeliver this message automatically, then you can enable automatic redelivery 
mechanism for  unacknowledged messages. With automatic redelivery enabled, the 
client tracks the unacknowledged messages within the entire `acktimeout` time 
range, and sends a `redeliver unacknowledged messages` request to the broker 
automatically when the acknowledgement timeout is specified.
 
+You can also use the redelivery backoff mechanism, redeliver messages with 
different delays by setting the number 
+of times the messages is retried.
+
+If you want to use Redelivery Backoff, you can use the following API.

Review comment:
       ```suggestion
   If you want to use redelivery backoff, you can use the following API.
   ```

##########
File path: site2/docs/concepts-messaging.md
##########
@@ -194,16 +194,41 @@ But this is not flexible enough. A better way is to use 
the **redelivery backoff
 If you want to use `Negative Redelivery Backoff`, you can use the following 
API.
 
 ```java
-consumer.negativeAckRedeliveryBackoff(NegativeAckRedeliveryExponentialBackoff.builder()
-        .minNackTimeMs(1000)
-        .maxNackTimeMs(60 * 1000)
+consumer.negativeAckRedeliveryBackoff(ExponentialRedeliveryBackoff.builder()
+        .minDelayMs(1000)
+        .maxDelayMs(60 * 1000)
         .build())
 ```
 
 ### Acknowledgement timeout
 
 If a message is not consumed successfully, and you want the broker to 
redeliver this message automatically, then you can enable automatic redelivery 
mechanism for  unacknowledged messages. With automatic redelivery enabled, the 
client tracks the unacknowledged messages within the entire `acktimeout` time 
range, and sends a `redeliver unacknowledged messages` request to the broker 
automatically when the acknowledgement timeout is specified.
 
+You can also use the redelivery backoff mechanism, redeliver messages with 
different delays by setting the number 
+of times the messages is retried.
+
+If you want to use Redelivery Backoff, you can use the following API.
+```java
+consumer.ackTimeout(10, TimeUnit.SECOND)
+        .ackTimeoutRedeliveryBackoff(ExponentialRedeliveryBackoff.builder()
+        .minDelayMs(1000)
+        .maxDelayMs(60000)
+        .multiplier(2).build())
+```
+
+The message redelivery behavior should be:

Review comment:
       ```suggestion
   The message redelivery behavior should be as follows.
   ```

##########
File path: site2/website-next/docs/concepts-messaging.md
##########
@@ -229,6 +229,31 @@ 
consumer.negativeAckRedeliveryBackoff(NegativeAckRedeliveryExponentialBackoff.bu
 
 If a message is not consumed successfully, and you want the broker to 
redeliver this message automatically, then you can enable automatic redelivery 
mechanism for  unacknowledged messages. With automatic redelivery enabled, the 
client tracks the unacknowledged messages within the entire `acktimeout` time 
range, and sends a `redeliver unacknowledged messages` request to the broker 
automatically when the acknowledgement timeout is specified.
 
+You can also use the redelivery backoff mechanism, redeliver messages with 
different delays by setting the number
+of times the messages is retried.
+
+If you want to use Redelivery Backoff, you can use the following API.
+```java
+consumer.ackTimeout(10, TimeUnit.SECOND)
+        .ackTimeoutRedeliveryBackoff(ExponentialRedeliveryBackoff.builder()
+        .minDelayMs(1000)
+        .maxDelayMs(60000)
+        .multiplier(2).build())
+```
+
+The message redelivery behavior should be:

Review comment:
       same comment

##########
File path: site2/docs/client-libraries-java.md
##########
@@ -405,22 +406,51 @@ consumer.acknowledge(messages)
 
 ### Negative acknowledgment redelivery backoff
 
-The `NegativeAckRedeliveryBackoff` introduces a redelivery backoff mechanism. 
You can achieve redelivery with different delays by setting `redeliveryCount ` 
of messages. 
+The `RedeliveryBackoff` introduces a redelivery backoff mechanism. You can 
achieve redelivery with different delays by setting `redeliveryCount ` of 
messages. 
 
 ```java
 Consumer consumer =  client.newConsumer()
         .topic("my-topic")
         .subscriptionName("my-subscription")
-        
.negativeAckRedeliveryBackoff(NegativeAckRedeliveryExponentialBackoff.builder()
-                .minNackTimeMs(1000)
-                .maxNackTimeMs(60 * 1000)
+        .negativeAckRedeliveryBackoff(ExponentialRedeliveryBackoff.builder()
+                .minDelayMs(1000)
+                .maxDelayMs(60 * 1000)
                 .build())
         .subscribe();
 ```
+### Acknowledgement timeout redelivery backoff
+
+The `RedeliveryBackoff` introduces a redelivery backoff mechanism. You can 
redeliver messages with different delays by setting the number
+of times the messages is retried.
+
+```java
+Consumer consumer =  client.newConsumer()
+        .topic("my-topic")
+        .subscriptionName("my-subscription")
+        .ackTimeout(10, TimeUnit.SECOND)
+        .ackTimeoutRedeliveryBackoff(ExponentialRedeliveryBackoff.builder()
+                .minDelayMs(1000)
+                .maxDelayMs(60000)
+                .multiplier(2)
+                .build())
+        .subscribe();
+```
+The message redelivery behavior should be:

Review comment:
       same comment

##########
File path: site2/website-next/docs/client-libraries-java.md
##########
@@ -479,10 +481,40 @@ Consumer consumer =  client.newConsumer()
 
 ```
 
+### Acknowledgement timeout redelivery backoff
+
+The `RedeliveryBackoff` introduces a redelivery backoff mechanism. You can 
redeliver messages with different delays by setting the number
+of times the messages is retried.
+
+```java
+Consumer consumer =  client.newConsumer()
+        .topic("my-topic")
+        .subscriptionName("my-subscription")
+        .ackTimeout(10, TimeUnit.SECOND)
+        .ackTimeoutRedeliveryBackoff(ExponentialRedeliveryBackoff.builder()
+                .minDelayMs(1000)
+                .maxDelayMs(60000)
+                .multiplier(2)
+                .build())
+        .subscribe();
+```
+The message redelivery behavior should be:

Review comment:
       same comment




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to