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

   ## Summary
   
   - Implement `ShutdownAware` interface in `EventHubsConsumer` and 
`GooglePubsubConsumer` to prevent potential message loss during graceful 
shutdown
   - Track in-flight exchanges with `AtomicInteger pendingExchanges` counter in 
both consumers
   - Split shutdown lifecycle: `doStop()` stops accepting new messages while 
keeping connections alive; `doShutdown()` releases resources after in-flight 
exchanges complete
   - For Google PubSub, instrument both synchronous pull and asynchronous 
(`CamelMessageReceiver`) code paths
   
   This follows the same pattern established in CAMEL-23260 for 
`ServiceBusConsumer`.
   
   ## Test plan
   
   - [x] Added `EventHubsConsumerShutdownTest` — verifies `deferShutdown()` 
returns true and stops client, pending exchange size tracking, `doStop()` vs 
`doShutdown()` lifecycle split
   - [x] Added `GooglePubsubConsumerShutdownTest` — verifies `deferShutdown()` 
returns true, pending exchange counter increment/decrement
   - [x] All existing EventHubs tests pass (15 unit + 8 integration skipped)
   - [x] All existing Google PubSub tests pass (21 unit + 16 integration)
   - [x] Full reactor build passes
   
   _Claude Code on behalf of Claus Ibsen_


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