Repository navigation
Conversation
Coordinate the pending-message check and idle return with session start. A dispatch holding a session that just went idle moves it back to active before submitting work. Fixes apache#2645
cshannon
force-pushed
the
fix/2645-2647-ra-session-recovery
branch
from
December 3, 2026 23:30
1e7ae70 to
0e671fb
Compare
Retry checked and unchecked WorkManager rejections with capped backoff, including rejection after acceptance. Handle each submission rejection once even when the WorkManager reports it by callback and by throwing. Retry delivery without disconnecting a healthy broker connection and retry rejected endpoint connection work separately. Prefer a container timer and fall back to a daemon timer that only resubmits work. Cancel retries when the endpoint stops. Submit connection work outside endpoint locks and ignore stale submissions after a stop or restart. Surface known nonretryable failures immediately and log sustained retryable rejection at WARN. Fixes apache#2647
cshannon
force-pushed
the
fix/2645-2647-ra-session-recovery
branch
from
December 3, 2026 23:39
0e671fb to
07e44bf
Compare
cshannon
marked this pull request as draft
December 3, 2026 23:43
Contributor
Author
|
I ran some further testing on this and I think there's some regressions, I'm going to close it for now and keep working on it before submitting again so I stop force pushing. |
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.
Fixes two independent causes of stalled message delivery in
activemq-ra, in separate commits:returnToPool()method without allowing duplicate returns or returning a session that still has a worker.Verification: All 20 focused Maven tests passed (
WorkRejectionRecoveryTest,ServerSessionHandoffTest, and the delivery, parallel delivery, and async stop cases inMDBTest). Coverage includes stopping during a blocked reconnect submission, ignoring stale work after restart, surfacing nonretryable rejection, and warning on sustained rejection while retaining recovery.Fixes #2645
Fixes #2647
Note: This stuff is very difficult to get right so I obviously worked with an LLM to generate the fixes here and went back and forth a few times.