Show / Hide Table of Contents

    Interface IEventPublisher

    Publishes the messages implementing IEvent.

    Namespace: Silverback.Messaging.Publishing
    Assembly: Silverback.Core.Model.dll
    Syntax
    public interface IEventPublisher

    Methods

    | Improve this doc View source

    Publish(IEvent)

    Publishes the specified event to the internal bus. The message will be forwarded to its subscribers and the method will not complete until all subscribers have processed it (unless using Silverback.Integration to produce and consume the message through a message broker).

    Declaration
    void Publish(IEvent eventMessage)
    Parameters
    Type Name Description
    IEvent eventMessage

    The event to be published.

    | Improve this doc View source

    Publish(IEvent, bool)

    Publishes the specified event to the internal bus. The message will be forwarded to its subscribers and the method will not complete until all subscribers have processed it (unless using Silverback.Integration to produce and consume the message through a message broker).

    Declaration
    void Publish(IEvent eventMessage, bool throwIfUnhandled)
    Parameters
    Type Name Description
    IEvent eventMessage

    The event to be published.

    bool throwIfUnhandled

    A boolean value indicating whether an exception must be thrown if no subscriber is handling the message.

    | Improve this doc View source

    PublishAsync(IEvent)

    Publishes the specified event to the internal bus. The message will be forwarded to its subscribers and the Task will not complete until all subscribers have processed it (unless using Silverback.Integration to produce and consume the message through a message broker).

    Declaration
    Task PublishAsync(IEvent eventMessage)
    Parameters
    Type Name Description
    IEvent eventMessage

    The event to be executed.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    | Improve this doc View source

    PublishAsync(IEvent, bool)

    Publishes the specified event to the internal bus. The message will be forwarded to its subscribers and the Task will not complete until all subscribers have processed it (unless using Silverback.Integration to produce and consume the message through a message broker).

    Declaration
    Task PublishAsync(IEvent eventMessage, bool throwIfUnhandled)
    Parameters
    Type Name Description
    IEvent eventMessage

    The event to be executed.

    bool throwIfUnhandled

    A boolean value indicating whether an exception must be thrown if no subscriber is handling the message.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

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