You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/04/21 04:24:16 UTC

[GitHub] [pulsar] michaeljmarshall commented on a diff in pull request #15190: [improve][java-client] Better error message for `reconsumeLater`

michaeljmarshall commented on code in PR #15190:
URL: https://github.com/apache/pulsar/pull/15190#discussion_r854762005


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBase.java:
##########
@@ -466,7 +466,7 @@ public CompletableFuture<Void> reconsumeLaterAsync(Message<?> message, long dela
     public CompletableFuture<Void> reconsumeLaterAsync(
             Message<?> message, Map<String, String> customProperties, long delayTime, TimeUnit unit) {
         if (!conf.isRetryEnable()) {
-            return FutureUtil.failedFuture(new PulsarClientException("reconsumeLater method not support!"));
+            return FutureUtil.failedFuture(new PulsarClientException("reconsumeLater method not supported! Have you enabled retries in your consumer?"));

Review Comment:
   Instead of asking a question, I think it would be appropriate to return a statement with the name of the specific configuration value. It could be something like:
   
   ```suggestion
               return FutureUtil.failedFuture(new PulsarClientException("reconsumeLater method not supported becuase retryEnabled is false."));
   ```
   



-- 
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: commits-unsubscribe@pulsar.apache.org

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