Skip to content

[backport camel-4.18.x] CAMEL-24284: Reset recoverTask after successful SJMS connection recovery - #25288

Merged
davsclaus merged 1 commit into
camel-4.18.xfrom
backport/25283-to-camel-4.18.x
Aug 3, 2026
Merged

[backport camel-4.18.x] CAMEL-24284: Reset recoverTask after successful SJMS connection recovery#25288
davsclaus merged 1 commit into
camel-4.18.xfrom
backport/25283-to-camel-4.18.x

Conversation

@davsclaus

Copy link
Copy Markdown
Contributor

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

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

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>
@davsclaus davsclaus added the backport indicate that a Pull request is a backport from a fix from the main branch label Aug 3, 2026

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@davsclaus davsclaus added the bug Something isn't working label Aug 3, 2026
@davsclaus davsclaus self-assigned this Aug 3, 2026
@davsclaus
davsclaus merged commit d94bd8c into camel-4.18.x Aug 3, 2026
3 checks passed
@davsclaus
davsclaus deleted the backport/25283-to-camel-4.18.x branch August 3, 2026 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport indicate that a Pull request is a backport from a fix from the main branch bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants