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

   Fixes [CAMEL-24449](https://issues.apache.org/jira/browse/CAMEL-24449).
   
   SagaProcessor.getCurrentSagaCoordinator() prefers the exchange's internal 
state, which
   survives removeHeaders("*"), and falls back to the Long-Running-Action 
message header so
   a coordinator started elsewhere can be joined. That fallback was added under 
CAMEL-23469
   for LRA protocol interoperability, but it applied to every saga service - 
including the
   default InMemorySagaService, where no external coordinator exists.
   
   The header sits outside the Camel namespace that consumers filter, and
   setCurrentSagaCoordinator() writes the id back onto the message, so a caller 
learns a live
   id and a later message naming it had its exchange joined to that saga. Under 
AUTO
   completion that reaches complete()/compensate() for saga state the exchange 
did not start.
   
   Add CamelSagaService.isLongRunningActionHeaderSupported(), defaulting to 
false, and
   consult the header only when the configured service says it takes part in 
such a
   protocol. LRASagaService overrides it to true, so the interoperability 
CAMEL-23469 added
   is unchanged - this narrows the fallback to where it was intended rather 
than removing it.
   
   A custom CamelSagaService that joins sagas started by another participant 
through the
   header has to override the new method.
   
   The test records the ids reaching getSaga rather than trying to join a live 
saga: a saga
   started by another route has already completed by the time a second exchange 
could present
   its id, so that route fails for an unrelated reason and proves nothing.
   
   Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
   Signed-off-by: Andrea Cosentino <[email protected]>
   \n## Verification\n\n5 files changed, including 1 test file(s). Module build 
with \`-am\` is green on current main, no generated-file drift. Verified 
against the pre-fix code when the change was written.
   
   _Claude Code on behalf of oscerd_


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