allthingssecurity commented on code in PR #27918:
URL: https://github.com/apache/camel/pull/27918#discussion_r4302723738
##########
components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoAbstractConsumerThread.java:
##########
@@ -99,8 +99,20 @@ protected boolean processExchange(Exchange exchange) {
public void run() {
stoppedLatch = new CountDownLatch(1);
try {
- while (keepRunning) {
+ // an interrupt ends the thread, as it did before the cursor was
reopened inside the try
+ while (keepRunning && !Thread.currentThread().isInterrupted()) {
try {
+ if (cursor == null) {
+ // a new cursor after the previous one ended. It is
opened here, inside the try, so that a
+ // failure to open it (the server cannot be reached
yet) is reported and tried again after
+ // the delay, instead of ending this thread while the
consumer stays started
Review Comment:
Filed as CAMEL-25731 (stack trace only for the first of consecutive cursor
failures, with a test).
_Claude Code on behalf of allthingssecurity_
--
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]