Show / Hide Table of Contents

    Interface IBroker

    The basic interface to interact with the message broker.

    Namespace: Silverback.Messaging.Broker
    Assembly: Silverback.Integration.dll
    Syntax
    public interface IBroker

    Properties

    | Improve this doc View source

    ConsumerEndpointType

    Gets the type of the IConsumerEndpoint that is being handled by this broker implementation.

    Declaration
    Type ConsumerEndpointType { get; }
    Property Value
    Type Description
    Type
    | Improve this doc View source

    Consumers

    Gets the collection of IConsumer that have been created so far.

    Declaration
    IReadOnlyList<IConsumer> Consumers { get; }
    Property Value
    Type Description
    IReadOnlyList<IConsumer>
    | Improve this doc View source

    IsConnected

    Gets a value indicating whether this broker is currently connected.

    Declaration
    bool IsConnected { get; }
    Property Value
    Type Description
    bool
    | Improve this doc View source

    ProducerEndpointType

    Gets the type of the IProducerEndpoint that is being handled by this broker implementation.

    Declaration
    Type ProducerEndpointType { get; }
    Property Value
    Type Description
    Type
    | Improve this doc View source

    Producers

    Gets the collection of IProducer that have been created so far.

    Declaration
    IReadOnlyList<IProducer> Producers { get; }
    Property Value
    Type Description
    IReadOnlyList<IProducer>

    Methods

    | Improve this doc View source

    AddConsumer(IConsumerEndpoint)

    Adds an IConsumer that will consume from the specified endpoint as soon as the broker is connected. The received messages will be forwarded to the specified callback delegate.

    Declaration
    IConsumer AddConsumer(IConsumerEndpoint endpoint)
    Parameters
    Type Name Description
    IConsumerEndpoint endpoint

    The source endpoint.

    Returns
    Type Description
    IConsumer

    The IConsumer for the specified endpoint.

    | Improve this doc View source

    ConnectAsync()

    Connect to the message broker to start consuming.

    Declaration
    Task ConnectAsync()
    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    | Improve this doc View source

    DisconnectAsync()

    Disconnect from the message broker to stop consuming.

    Declaration
    Task DisconnectAsync()
    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    | Improve this doc View source

    GetProducer(IProducerEndpoint)

    Returns an IProducer to be used to produce to the specified endpoint.

    Declaration
    IProducer GetProducer(IProducerEndpoint endpoint)
    Parameters
    Type Name Description
    IProducerEndpoint endpoint

    The target endpoint.

    Returns
    Type Description
    IProducer

    The IProducer for the specified endpoint.

    | Improve this doc View source

    GetProducer(string)

    Returns an IProducer to be used to produce to the specified endpoint.

    Declaration
    IProducer GetProducer(string endpointName)
    Parameters
    Type Name Description
    string endpointName

    The target endpoint name (or friendly name).

    Returns
    Type Description
    IProducer

    The IProducer for the specified endpoint.

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