Table of Contents

Class ConsumerDefinition<TConsumer>

Namespace
MassTransit
Assembly
MassTransit.Abstractions.dll

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

public class ConsumerDefinition<TConsumer> : IConsumerDefinition<TConsumer>, IConsumerDefinition, IDefinition where TConsumer : class, IConsumer

Type Parameters

TConsumer
Inheritance
ConsumerDefinition<TConsumer>
Implements
Inherited Members

Constructors

ConsumerDefinition()

protected ConsumerDefinition()

Properties

ConcurrentMessageLimit

public int? ConcurrentMessageLimit { get; protected set; }

Property Value

int?

EndpointDefinition

Sets the endpoint definition, if available

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

Property Value

IEndpointDefinition<TConsumer>

EndpointName

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

protected string EndpointName { set; }

Property Value

string

Methods

ConfigureConsumer(IReceiveEndpointConfigurator, IConsumerConfigurator<TConsumer>)

Called when the consumer is being configured on the endpoint. Configuration only applies to this consumer, and does not apply to the endpoint.

protected virtual void ConfigureConsumer(IReceiveEndpointConfigurator endpointConfigurator, IConsumerConfigurator<TConsumer> consumerConfigurator)

Parameters

endpointConfigurator IReceiveEndpointConfigurator

The receive endpoint configurator for the consumer

consumerConfigurator IConsumerConfigurator<TConsumer>

The consumer configurator

Endpoint(Action<IEndpointRegistrationConfigurator>?)

Configure the consumer endpoint

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

Parameters

configure Action<IEndpointRegistrationConfigurator>