Table of Contents

Class Supervisor

Namespace
MassTransit.Middleware
Assembly
MassTransit.Abstractions.dll

Supervises a set of agents, allowing for graceful Start, Stop, and Ready state management

public class Supervisor : Agent, ISupervisor, IAgent
Inheritance
Supervisor
Implements
Inherited Members
Extension Methods

Constructors

Supervisor()

Creates a Supervisor

public Supervisor()

Properties

PeakActiveCount

The peak number of agents active at the same time

public int PeakActiveCount { get; }

Property Value

int

TotalCount

The total number of agents that were added to the supervisor

public long TotalCount { get; }

Property Value

long

Methods

Add(IAgent)

Add an Agent to the Supervisor

public void Add(IAgent agent)

Parameters

agent IAgent

The agent

SetReady()

Puts the agent in a ready state, explicitly

public override void SetReady()

StopAgent(StopContext)

Stops the agent

protected override Task StopAgent(StopContext context)

Parameters

context StopContext

Returns

Task

StopSupervisor(StopSupervisorContext)

protected virtual Task StopSupervisor(StopSupervisorContext context)

Parameters

context StopSupervisorContext

Returns

Task