Show / Hide Table of Contents

    Class ConsumerPipelineContext

    The context that is passed along the consumer behaviors pipeline.

    Inheritance
    object
    ConsumerPipelineContext
    Implements
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Silverback.Messaging.Broker.Behaviors
    Assembly: Silverback.Integration.dll
    Syntax
    public sealed class ConsumerPipelineContext : IDisposable

    Constructors

    | Improve this doc View source

    ConsumerPipelineContext(IRawInboundEnvelope, IConsumer, ISequenceStore, IServiceProvider)

    Initializes a new instance of the ConsumerPipelineContext class.

    Declaration
    public ConsumerPipelineContext(IRawInboundEnvelope envelope, IConsumer consumer, ISequenceStore sequenceStore, IServiceProvider serviceProvider)
    Parameters
    Type Name Description
    IRawInboundEnvelope envelope

    The envelope containing the message being processed.

    IConsumer consumer

    The IConsumer that triggered this pipeline.

    ISequenceStore sequenceStore

    The ISequenceStore used to temporary store the pending sequences being consumed.

    IServiceProvider serviceProvider

    The IServiceProvider to be used to resolve the required services.

    Properties

    | Improve this doc View source

    Consumer

    Gets the IConsumer that triggered this pipeline.

    Declaration
    public IConsumer Consumer { get; }
    Property Value
    Type Description
    IConsumer
    | Improve this doc View source

    Envelope

    Gets or sets the envelopes containing the messages being processed.

    Declaration
    public IRawInboundEnvelope Envelope { get; set; }
    Property Value
    Type Description
    IRawInboundEnvelope
    | Improve this doc View source

    IsSequenceEnd

    Gets a value indicating whether the current message was recognized as the end of the sequence.

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

    IsSequenceStart

    Gets a value indicating whether the current message was recognized as the beginning of a new sequence.

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

    ProcessingTask

    Gets the Task representing the message processing when it is not directly awaited (e.g. when starting the processing of a Sequence. This Task will complete when all subscribers return.

    Declaration
    public Task? ProcessingTask { get; }
    Property Value
    Type Description
    Task
    | Improve this doc View source

    Sequence

    Gets a the ISequence the current message belongs to.

    Declaration
    public ISequence? Sequence { get; }
    Property Value
    Type Description
    ISequence
    | Improve this doc View source

    SequenceStore

    Gets the ISequenceStore used to temporary store the pending sequences being consumed.

    Declaration
    public ISequenceStore SequenceStore { get; }
    Property Value
    Type Description
    ISequenceStore
    | Improve this doc View source

    ServiceProvider

    Gets the IServiceProvider to be used to resolve the required services.

    Declaration
    public IServiceProvider ServiceProvider { get; }
    Property Value
    Type Description
    IServiceProvider
    | Improve this doc View source

    TransactionManager

    Gets the IConsumerTransactionManager that is handling the current pipeline transaction.

    Declaration
    public IConsumerTransactionManager TransactionManager { get; }
    Property Value
    Type Description
    IConsumerTransactionManager

    Methods

    | Improve this doc View source

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Declaration
    public void Dispose()
    | Improve this doc View source

    GetBrokerMessageIdentifiers()

    Gets the identifiers of the messages being handled in this context (either the single message or the sequence).

    Declaration
    public IReadOnlyCollection<IBrokerMessageIdentifier> GetBrokerMessageIdentifiers()
    Returns
    Type Description
    IReadOnlyCollection<IBrokerMessageIdentifier>

    The list of identifiers.

    | Improve this doc View source

    ReplaceServiceScope(IServiceScope)

    Replaces the IServiceProvider with the one from the specified scope.

    Declaration
    public void ReplaceServiceScope(IServiceScope newServiceScope)
    Parameters
    Type Name Description
    IServiceScope newServiceScope

    The IServiceScope to be used.

    | Improve this doc View source

    SetIsSequenceEnd()

    Sets the IsSequenceEnd property to true, indicating that the current message was recognized as the end of the sequence.

    Declaration
    public void SetIsSequenceEnd()
    | Improve this doc View source

    SetSequence(ISequence, in bool)

    Sets the current sequence.

    Declaration
    public void SetSequence(ISequence sequence, in bool isSequenceStart)
    Parameters
    Type Name Description
    ISequence sequence

    The ISequence being processed.

    bool isSequenceStart

    A value indicating whether the current message was recognized as the beginning of a new sequence.

    Implements

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