davsclaus opened a new pull request, #25169:
URL: https://github.com/apache/camel/pull/25169

   ## Summary
   
   _Claude Code on behalf of davsclaus_
   
   When a `BackgroundTask` is used via the blocking `run()` method (Kafka 
reconnection, PgEvent, SMPP), the task previously removed itself from the 
`TaskManagerRegistry` inside `runTaskWrapper()` as soon as the supplier 
succeeded or the budget exhausted — before `run()` returned. This made the task 
invisible to the Internal Tasks dev console during active recovery.
   
   - Register the task in the registry immediately when `run()` is called 
(before the first scheduled tick)
   - Skip add/remove in `runTaskWrapper()` for the `run()` path — let 
`waitForTaskCompletion()` handle cleanup
   - The `schedule()` path (non-blocking, used by SJMS and Master) is unchanged
   - Added 3 unit tests verifying registry lifecycle during blocking run
   
   ## Test plan
   
   - [x] New `BackgroundTaskRegistryTest` — 3 tests covering immediate 
registration, persistence during retries, and cleanup after completion
   - [x] Existing `BackgroundTaskTest` and `BackgroundIterationTimeTaskTest` 
pass (13 tests)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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]

Reply via email to