A- a representation of an action command that is shared across all actions in the saga. This is typically a generic type, such as Json, or if using Avro serialization, SpecificRecord or GenericRecord
This provides a mechanism to invoke a saga from any Java code, and receive the saga response asynchronously.
The client can be hosted in a separate process. It only needs to be able to access the same cluster as the SagaApp is running on, and share the same serdes for the saga request and response topics.
|Modifier and Type||Method and Description|
Returns the result of the saga.
Initiates a saga.
public io.simplesource.data.FutureResult<SagaError,SagaId> submitSaga(SagaRequest<A> request)
This does not return the result of the saga, just an indication of whether the request was published successfully or not.
We call the
getSagaResponse method to asychronously return the result of the saga.
public io.simplesource.data.FutureResult<SagaError,SagaResponse> getSagaResponse(SagaId sagaId, java.time.Duration timeout)
Copyright © 2019. All rights reserved.