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

   _Claude Code on behalf of Claus Ibsen (davsclaus)_
   
   JIRA: [CAMEL-26459](https://issues.apache.org/jira/browse/CAMEL-26459)
   
   With `multipleConsumers=true`, the first consumer that failed completed the 
exchange right away, while the other consumers were still routing their copy:
   
   - **InOut**: the producer keeps its `completed` flag as the 
`DISRUPTOR_IGNORE_EXCHANGE` property, and the snapshot of the published 
exchange shares it. The early completion set the flag, so a consumer that was 
still busy with an earlier event skipped the message as if the producer had 
timed out.
   - **On completions of the caller** (such as the rollback of a file consumer) 
ran while the other consumers were still routing the message.
   
   The InOnly case of the ticket (a late consumer copies an exchange that 
already has the failure) was fixed by CAMEL-26680 (each consumer copies a 
snapshot taken at publish).
   
   ### Change
   
   `MultipleConsumerSynchronizedExchange` now completes the exchange once, when 
all consumers are done, as `camel-seda` does: the first failure is recorded and 
copied back then (no aggregation of the results). This changes the early 
completion that CAMEL-26458 kept; the upgrade guide explains what users see (an 
InOut producer gets the failure once all consumers are done, so its timeout 
covers them all).
   
   ### Tests
   
   - New `DisruptorMultipleConsumersInOutLateConsumerTest`: a consumer busy 
with an earlier message still routes the message that another consumer failed, 
and the InOut caller gets the failure only after that. Fails on main.
   - `DisruptorMultipleConsumersOnCompletionTest`: `testFailureThenSuccess` and 
`testBothFail` now expect the failure event once all consumers are done.
   - `MultipleConsumerSynchronizedExchangeTest`: fail, then success, completes 
once after the second consumer.
   - `camel-disruptor`: 149 tests, 0 failures; the new and changed tests passed 
5 runs in a row.
   
   Docs: `disruptor-component.adoc` (multipleConsumers) and the 4.24 upgrade 
guide.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_0128ThHB3iQdrvSRLVBGRrdP
   


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