Show / Hide Table of Contents

    Class DbOutboxWriter

    Stores the outbound messages into the database. Used by the OutboxProduceStrategy.

    Inheritance
    object
    RepositoryBase<OutboxMessage>
    DbOutboxWriter
    Implements
    IOutboxWriter
    Inherited Members
    RepositoryBase<OutboxMessage>.DbContext
    RepositoryBase<OutboxMessage>.DbSet
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Silverback.Messaging.Outbound.TransactionalOutbox.Repositories
    Assembly: Silverback.Integration.dll
    Syntax
    public class DbOutboxWriter : RepositoryBase<OutboxMessage>, IOutboxWriter

    Constructors

    | Improve this doc View source

    DbOutboxWriter(IDbContext)

    Initializes a new instance of the DbOutboxWriter class.

    Declaration
    public DbOutboxWriter(IDbContext dbContext)
    Parameters
    Type Name Description
    IDbContext dbContext

    The IDbContext to use as storage.

    Methods

    | Improve this doc View source

    CommitAsync()

    Called to commit the transaction, storing the pending messages to the outbox.

    Declaration
    public Task CommitAsync()
    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    | Improve this doc View source

    RollbackAsync()

    Called to rollback the transaction, preventing the pending messages to be stored in the outbox.

    Declaration
    public Task RollbackAsync()
    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    | Improve this doc View source

    WriteAsync(object?, byte[]?, IReadOnlyCollection<MessageHeader>?, string, string)

    Adds the message contained in the specified envelope to the outbox.

    Declaration
    public Task WriteAsync(object? message, byte[]? messageBytes, IReadOnlyCollection<MessageHeader>? headers, string endpointName, string actualEndpointName)
    Parameters
    Type Name Description
    object message

    The message to be delivered.

    byte[] messageBytes

    The actual serialized message to be delivered.

    IReadOnlyCollection<MessageHeader> headers

    The message headers.

    string endpointName

    The name of the configured endpoint to produce to.

    string actualEndpointName

    The actual endpoint to produce to.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Implements

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