Interface ISagaRepository<TSaga>
- Namespace
- MassTransit
- Assembly
- MassTransit.Abstractions.dll
A saga repository is used by the service bus to dispatch messages to sagas
public interface ISagaRepository<TSaga> : IProbeSite where TSaga : class, ISaga
Type Parameters
TSaga
- Inherited Members
Methods
SendQuery<T>(ConsumeContext<T>, ISagaQuery<TSaga>, ISagaPolicy<TSaga, T>, IPipe<SagaConsumeContext<TSaga, T>>)
Send the message to the saga repository where the query is used to find matching saga instances, which are invoked concurrently.
Task SendQuery<T>(ConsumeContext<T> context, ISagaQuery<TSaga> query, ISagaPolicy<TSaga, T> policy, IPipe<SagaConsumeContext<TSaga, T>> next) where T : class
Parameters
context
ConsumeContext<T>The saga query consume context
query
ISagaQuery<TSaga>policy
ISagaPolicy<TSaga, T>The saga policy for the message
next
IPipe<SagaConsumeContext<TSaga, T>>The saga consume pipe
Returns
Type Parameters
T
The message type
Send<T>(ConsumeContext<T>, ISagaPolicy<TSaga, T>, IPipe<SagaConsumeContext<TSaga, T>>)
Send the message to the saga repository where the context.CorrelationId has the CorrelationId of the saga instance.
Task Send<T>(ConsumeContext<T> context, ISagaPolicy<TSaga, T> policy, IPipe<SagaConsumeContext<TSaga, T>> next) where T : class
Parameters
context
ConsumeContext<T>The message consume context
policy
ISagaPolicy<TSaga, T>The saga policy for the message
next
IPipe<SagaConsumeContext<TSaga, T>>The saga consume pipe
Returns
Type Parameters
T
The message type