Show / Hide Table of Contents

    Class BrokerConnectorService

    Automatically connects the message brokers when the application starts and disconnects them when the application is being stopped.

    Inheritance
    object
    BackgroundService
    BrokerConnectorService
    Implements
    IHostedService
    IDisposable
    Inherited Members
    BackgroundService.StartAsync(CancellationToken)
    BackgroundService.StopAsync(CancellationToken)
    BackgroundService.Dispose()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Silverback.Messaging.Broker
    Assembly: Silverback.Integration.dll
    Syntax
    public class BrokerConnectorService : BackgroundService, IHostedService, IDisposable

    Constructors

    | Improve this doc View source

    BrokerConnectorService(IHostApplicationLifetime, IBrokerCollection, BrokerConnectionOptions, ISilverbackLogger<BrokerConnectorService>)

    Initializes a new instance of the BrokerConnectorService class.

    Declaration
    public BrokerConnectorService(IHostApplicationLifetime applicationLifetime, IBrokerCollection brokersCollection, BrokerConnectionOptions connectionOptions, ISilverbackLogger<BrokerConnectorService> logger)
    Parameters
    Type Name Description
    IHostApplicationLifetime applicationLifetime

    The IHostApplicationLifetime.

    IBrokerCollection brokersCollection

    The IBrokerCollection.

    BrokerConnectionOptions connectionOptions

    The BrokerConnectionOptions.

    ISilverbackLogger<BrokerConnectorService> logger

    The ISilverbackLogger.

    Methods

    | Improve this doc View source

    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.

    Declaration
    protected override Task ExecuteAsync(CancellationToken stoppingToken)
    Parameters
    Type Name Description
    CancellationToken stoppingToken

    Triggered when StopAsync(CancellationToken) is called.

    Returns
    Type Description
    Task

    A Task that represents the long running operations.

    Overrides
    BackgroundService.ExecuteAsync(CancellationToken)

    Implements

    IHostedService
    IDisposable
    • Improve this doc
    • View source
    GitHub E-Mail
    ↑ Back to top © 2020 Sergio Aquilini