gnodet opened a new pull request, #25164: URL: https://github.com/apache/camel/pull/25164
_Claude Code on behalf of gnodet_ ## Summary Migrates all reconnection and retry loops across 10 components from `ForegroundTask` to `BackgroundTask` so they register with the `TaskManagerRegistry` and become visible in the dev console, CLI, and TUI internal-tasks view. **Affected components:** - **camel-kafka**: KafkaConsumer create/subscribe retry loops (`KafkaFetchRecords`) - **camel-ftp**: FTP and SFTP reconnection loops (`FtpOperations`, `SftpOperations`) - **camel-mllp**: TCP server bind retry loop (`TcpServerBindThread`) - **camel-infinispan**: Schema registration retry loop (`InfinispanRemoteManager`) - **camel-google-pubsub**: Error recovery delay (`GooglePubsubConsumer`) - **camel-zookeeper**: Reconnection backoff delay (`ZooKeeperConsumer`) - **camel-hazelcast**: SEDA error recovery delay (`HazelcastSedaConsumer`) - **camel-salesforce**: Handshake and subscribe retry delays (`SubscriptionHelper`) - **camel-mongodb-gridfs**: GridFS polling loop (`GridFsConsumer`) **What changed in each file:** - Replaced `Tasks.foregroundTask()` with `Tasks.backgroundTask()` - Switched from `IterationBudget` to `TimeBudget` via `Budgets.iterationTimeBudget()` (with `.withUnlimitedDuration()` where the original had no time bound) - Added a `ScheduledExecutorService` with proper lifecycle management (created in `doStart()`, shut down in `doStop()` — or method-local with try-finally for one-shot operations) - Assigned descriptive task names for visibility in monitoring tools **Reference patterns:** Components that already used `BackgroundTask` correctly — `camel-smpp` (`SmppUtils`), `camel-sjms` (`SimpleMessageListenerContainer`), `camel-pgevent` (`PgEventConsumer`) — served as the implementation model. ## Test plan - [x] All 10 affected modules compile successfully - [x] Code formatting verified (`mvn formatter:format impsort:sort` — 0 files needed changes) - [x] Kafka unit tests pass (`KafkaFetchRecordsTest`) - [x] Infinispan schema registration retry tests pass (5/5 — `InfinispanRemoteSchemaRegistrationRetryTest`) - [x] MLLP tests pass - [x] FTP/SFTP tests pass - [ ] Full CI build 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.6 <[email protected]> -- 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]
