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

   ## Backport of #23639
   
   Cherry-pick of #23639 onto `camel-4.18.x`.
   
   **Original PR:** #23639 - CAMEL-23646: Fix inverted BackgroundTask return 
values in sjms, pgevent and master
   **Original author:** @Croway
   **Target branch:** `camel-4.18.x`
   
   ### Original description
   
   The `BackOff` → `BackgroundTask` migration (CAMEL-22206) preserved callback 
return values verbatim, but the two APIs have **opposite boolean semantics**: 
`BackOff` returns `false` to stop, `BackgroundTask` returns `true` to stop. 
This caused infinite retry loops after successful recovery in three components.
   
   **camel-sjms/sjms2** — after a transient JMS connection interruption 
(reported with Oracle AQ), the consumer enters an infinite recovery loop. Each 
iteration destroys the working connection via `refreshConnection()` while 
`initConsumers()` skips re-creation (`consumers != null`), leaving consumers 
attached to closed sessions. Message consumption is permanently blocked.
   
   **camel-pgevent** — after successful PostgreSQL reconnection, the task keeps 
calling `initConnection()` every `reconnectDelay`, leaking connections and 
duplicating notification listeners.
   
   **camel-master** — after the delegated consumer starts, the task keeps 
calling `ServiceHelper.startService()` until budget exhaustion (default 10 
iterations). Can revive a consumer after leadership loss.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   _Claude Code on behalf of Federico Mariani_


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