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 Summary
Modifier and TypeMethodDescriptiondefault booleanWhether a saga coordinator may be selected from theLong-Running-Actionmessage header.newSaga(org.apache.camel.Exchange exchange) voidregisterStep(CamelSagaStep step) Methods inherited from interface org.apache.camel.CamelContextAware
setCamelContextMethods inherited from interface org.apache.camel.spi.HasCamelContext
getCamelContextMethods inherited from interface org.apache.camel.Service
build, close, init, start, stop
-
Method Details
-
newSaga
-
getSaga
-
registerStep
-
isLongRunningActionHeaderSupported
default boolean isLongRunningActionHeaderSupported()Whether a saga coordinator may be selected from theLong-Running-Actionmessage 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 theCamelnamespace 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-Actionheader may select a coordinator - Since:
- 4.23
-