gnodet-bot commented on code in PR #26778:
URL: https://github.com/apache/camel/pull/26778#discussion_r4084364684


##########
components/camel-pulsar/src/main/java/org/apache/camel/component/pulsar/PulsarConsumer.java:
##########
@@ -136,12 +145,32 @@ public void run() {
                         // by exiting the loop. We make it explicit instead of 
breaking the loop.
                         running = false;
                     } else {
-                        endpoint.getExceptionHandler().handleException(e);
+                        getExceptionHandler().handleException("Error consuming 
from pulsar", e);
+                        running = waitBeforeRetry();
                     }
                 } catch (Exception e) {
-                    endpoint.getExceptionHandler().handleException(e);
+                    getExceptionHandler().handleException("Error consuming 
from pulsar", e);
+                    running = waitBeforeRetry();
                 }
             }
         }
+
+        /**
+         * Waits before polling again, so that a failure which does not clear 
- an unreachable broker, a consumer in
+         * Failed state - does not turn this into a hot loop on every consumer 
thread, reporting the same error to the
+         * exception handler as fast as the CPU allows.
+         *
+         * @return <tt>false</tt> when the wait was interrupted, which is how 
a stopping consumer leaves the loop

Review Comment:
   🔧 **Nit:** `<tt>` is deprecated since HTML5 — use `{@code false}` instead.
   
   ```suggestion
            * @return {@code false} when the wait was interrupted, which is how 
a stopping consumer leaves the loop
   ```



-- 
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