[backport camel-4.18.x] CAMEL-24284: Reset recoverTask after successful SJMS connection recovery - #25288
Merged
Merged
Conversation
Fix a bug where the SJMS consumer becomes permanently dead after recovering from a JMS connection failure once. BackgroundTask.schedule() sets running=true but never resets it, so the re-scheduling guard permanently blocks after the first successful recovery. Reset recoverTask and recoverFuture to null after successful recovery to re-arm the mechanism for subsequent failures. Closes #25283 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gnodet
approved these changes
Aug 3, 2026
gnodet
left a comment
Contributor
There was a problem hiding this comment.
Clean backport of PR #25283 to camel-4.18.x. The diff is identical to the original. The fix correctly resets recoverTask and recoverFuture under connectionLock after successful recovery, re-arming the mechanism for subsequent failures. Locking discipline is consistent with the rest of the class.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of @gnodet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #25283
Cherry-pick of #25283 onto
camel-4.18.x.Original PR: #25283 - CAMEL-24284: Reset recoverTask after successful SJMS connection recovery
Original author: @gansheer
Target branch:
camel-4.18.xOriginal description
Fix a bug where the SJMS consumer becomes permanently dead after recovering from a JMS connection failure once — any subsequent connection failure cannot trigger recovery.
Root cause: BackgroundTask.schedule() sets running=true but never resets it, so the re-scheduling guard permanently blocks after the first successful recovery.
Fix: Reset recoverTask and recoverFuture to null (and cancel the scheduled future) after successful recovery to re-arm the mechanism for subsequent failures.