Interface CamelSagaService

All Superinterfaces:
AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.spi.HasCamelContext, org.apache.camel.Service
All Known Implementing Classes:
InMemorySagaService

public interface CamelSagaService extends org.apache.camel.Service, org.apache.camel.CamelContextAware
A Camel saga service is a factory of saga coordinators.
  • Method Details

    • newSaga

      CompletableFuture<CamelSagaCoordinator> newSaga(org.apache.camel.Exchange exchange)
    • getSaga

    • registerStep

      void registerStep(CamelSagaStep step)
    • isLongRunningActionHeaderSupported

      default boolean isLongRunningActionHeaderSupported()
      Whether a saga coordinator may be selected from the Long-Running-Action message header.

      The saga id normally travels in the exchange's internal state, which survives removeHeaders("*"). The header is consulted as well so that a coordinator started elsewhere can be joined - the LRA protocol carries the id that way. That only makes sense for a service which actually participates in such a protocol: the header sits outside the Camel namespace that consumers filter, and the id is written back onto responses, so where no external coordinator exists it lets a message choose which saga its exchange joins.

      Defaults to false. A service that takes part in a distributed saga protocol overrides it.

      Returns:
      true if the Long-Running-Action header may select a coordinator
      Since:
      4.23