Table of Contents

Class SagaDefinition<TSaga>

Namespace
MassTransit
Assembly
MassTransit.Abstractions.dll

A saga definition defines the configuration for a saga, which can be used by the automatic registration code to configure the consumer on a receive endpoint.

public class SagaDefinition<TSaga> : ISagaDefinition<TSaga>, ISagaDefinition, IDefinition where TSaga : class, ISaga

Type Parameters

TSaga
Inheritance
SagaDefinition<TSaga>
Implements
Inherited Members

Constructors

SagaDefinition()

protected SagaDefinition()

Properties

ConcurrentMessageLimit

Set the concurrent message limit for the saga, which limits how many saga instances are able to concurrently consume messages.

public int? ConcurrentMessageLimit { get; protected set; }

Property Value

int?

EndpointDefinition

Sets the endpoint definition, if available

public IEndpointDefinition<TSaga>? EndpointDefinition { get; set; }

Property Value

IEndpointDefinition<TSaga>

EndpointName

Specify the endpoint name (which may be a queue, or a subscription, depending upon the transport) on which the saga should be configured.

protected string EndpointName { set; }

Property Value

string

Methods

ConfigureSaga(IReceiveEndpointConfigurator, ISagaConfigurator<TSaga>)

Called when configuring the saga on the endpoint. Configuration only applies to this saga, and does not apply to the endpoint.

protected virtual void ConfigureSaga(IReceiveEndpointConfigurator endpointConfigurator, ISagaConfigurator<TSaga> sagaConfigurator)

Parameters

endpointConfigurator IReceiveEndpointConfigurator

The receive endpoint configurator for the consumer

sagaConfigurator ISagaConfigurator<TSaga>

The saga configurator

Endpoint(Action<IEndpointRegistrationConfigurator>?)

Configure the saga endpoint

protected void Endpoint(Action<IEndpointRegistrationConfigurator>? configure = null)

Parameters

configure Action<IEndpointRegistrationConfigurator>