Table of Contents

Class CarrotService

Namespace
CarrotMQ.Core
Assembly
CarrotMQ.Core.dll

Represents the main message consumer service.

public sealed class CarrotService : BackgroundService, IHostedService, IDisposable
Inheritance
CarrotService
Implements
Inherited Members

Constructors

CarrotService(ICarrotConsumerManager)

Initializes a new instance of the CarrotService class.

public CarrotService(ICarrotConsumerManager carrotConsumerManager)

Parameters

carrotConsumerManager ICarrotConsumerManager

The transport layer.

Methods

ExecuteAsync(CancellationToken)

This method is called when the IHostedService starts. The implementation should return a task that represents the lifetime of the long running operation(s) being performed.

protected override Task ExecuteAsync(CancellationToken stoppingToken)

Parameters

stoppingToken CancellationToken

Triggered when StopAsync(CancellationToken) is called.

Returns

Task

A Task that represents the long running operations.

Remarks

See Worker Services in .NET for implementation guidelines.