CAMEL-24591: camel-seda - Re-register released queue referenced - #26041
Conversation
…roducers or consumers restart Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 481 tested, 27 compile-only — current: 481 all testedMaveniverse Scalpel detected 508 affected modules (current approach: 481).
|
davsclaus
left a comment
There was a problem hiding this comment.
Thanks for the thorough fix, @JiriOndrusek — this is a clean continuation of CAMEL-24408 rather than a revert, and the test coverage is excellent.
I reviewed against the project conventions and also verified locally in an isolated worktree:
- ✅
camel-sedabuilds clean; full seda suite incore/camel-corepasses (114 tests, 0 failures) — no regressions. - ✅ The 3 new tests + the 2 CAMEL-24408 tests all pass with the fix.
- ✅ Reverting the production code and rerunning: all 3 new tests fail (
No queue available/ lost shared queue), confirming they genuinely exercise the regression and its two sibling cases rather than passing vacuously.
Strengths
getQueue()now re-syncsqueue/refto the component's canonical shared queue when the reference went stale, fixing field divergence at the source.- Nice DRY consolidation into
registerQueueIfStale(), andisReferenced()correctly detects the "non-null but de-listed" state that plain null-checks missed. - Each scenario (producer restart, consumer-first restart, shared-queue-key sibling) has a dedicated, well-commented test.
Conventions: test placement (core/camel-core/.../seda/) and JUnit assertion style both match the existing seda module; MockEndpoint.assertIsSatisfied() used correctly; no Thread.sleep(); commit carries the AI co-authorship trailer. No upgrade-guide entry needed since this restores prior behavior.
One non-blocking observation left inline. Approving.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Fixes CAMEL-24591 (regression from CAMEL-24408):
after the shared queue is released, stale endpoint
ref/queuefields made a send after producer route restart fail withNo queue available.Also fixes two sibling cases not in the ticket: consumer-first restart (pollers kept the orphaned queue) and shared queue key (restarted endpoint not re-added, so stopping the sibling removed the queue). Endpoints now re-register via
QueueReference.isReferenced(); each scenario is covered by a test.🤖 Generated with Claude Code
Description
Target
mainbranch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.AI-assisted contributions
Co-authored-bytrailers) and the PR description identifies the AI tool used.