Show / Hide Table of Contents

    Class ChunkSequence

    Represents a sequence of chunks that belong to the same message.

    Inheritance
    object
    SequenceBase<IRawInboundEnvelope>
    RawSequence
    ChunkSequence
    Implements
    ISequence
    IDisposable
    Inherited Members
    SequenceBase<IRawInboundEnvelope>.SequenceId
    SequenceBase<IRawInboundEnvelope>.IsPending
    SequenceBase<IRawInboundEnvelope>.IsAborted
    SequenceBase<IRawInboundEnvelope>.IsBeingConsumed
    SequenceBase<IRawInboundEnvelope>.Sequences
    SequenceBase<IRawInboundEnvelope>.Context
    SequenceBase<IRawInboundEnvelope>.SequencerBehaviorsTask
    SequenceBase<IRawInboundEnvelope>.ProcessingCompletedTask
    SequenceBase<IRawInboundEnvelope>.ShouldCreateNewActivity
    SequenceBase<IRawInboundEnvelope>.StreamProvider
    SequenceBase<IRawInboundEnvelope>.Activity
    SequenceBase<IRawInboundEnvelope>.ParentSequence
    SequenceBase<IRawInboundEnvelope>.AbortException
    SequenceBase<IRawInboundEnvelope>.Length
    SequenceBase<IRawInboundEnvelope>.TotalLength
    SequenceBase<IRawInboundEnvelope>.IsNew
    SequenceBase<IRawInboundEnvelope>.IsCompleting
    SequenceBase<IRawInboundEnvelope>.IsComplete
    SequenceBase<IRawInboundEnvelope>.AbortReason
    SequenceBase<IRawInboundEnvelope>.CreateStream<TMessage>(IReadOnlyCollection<IMessageFilter>)
    SequenceBase<IRawInboundEnvelope>.AddAsync(IRawInboundEnvelope, ISequence, bool)
    SequenceBase<IRawInboundEnvelope>.AbortAsync(SequenceAbortReason, Exception)
    SequenceBase<IRawInboundEnvelope>.GetBrokerMessageIdentifiers()
    SequenceBase<IRawInboundEnvelope>.Dispose()
    SequenceBase<IRawInboundEnvelope>.CompleteAsync(CancellationToken)
    SequenceBase<IRawInboundEnvelope>.Dispose(bool)
    SequenceBase<IRawInboundEnvelope>.OnTimeoutElapsedAsync()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Silverback.Messaging.Sequences.Chunking
    Assembly: Silverback.Integration.dll
    Syntax
    public class ChunkSequence : RawSequence, ISequence, IDisposable

    Constructors

    | Improve this doc View source

    ChunkSequence(string, int?, ConsumerPipelineContext)

    Initializes a new instance of the ChunkSequence class.

    Declaration
    public ChunkSequence(string sequenceId, int? totalLength, ConsumerPipelineContext context)
    Parameters
    Type Name Description
    string sequenceId

    The identifier that is used to match the consumed messages with their belonging sequence.

    int? totalLength

    The expected total length of the sequence.

    ConsumerPipelineContext context

    The current ConsumerPipelineContext, assuming that it will be the one from which the sequence gets published to the internal bus.

    Methods

    | Improve this doc View source

    AddCoreAsync(IRawInboundEnvelope, ISequence?, bool)

    Adds the message to the sequence.

    Declaration
    protected override Task<AddToSequenceResult> AddCoreAsync(IRawInboundEnvelope envelope, ISequence? sequence, bool throwIfUnhandled)
    Parameters
    Type Name Description
    IRawInboundEnvelope envelope

    The envelope to be added to the sequence.

    ISequence sequence

    The sequence to be added to the sequence.

    bool throwIfUnhandled

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

    Returns
    Type Description
    Task<AddToSequenceResult>

    A Task<TResult> representing the asynchronous operation. The task result contains a flag indicating whether the operation was successful and the number of streams that have been actually pushed.

    Overrides
    SequenceBase<IRawInboundEnvelope>.AddCoreAsync(IRawInboundEnvelope, ISequence, bool)
    | Improve this doc View source

    IsLastMessage(IRawInboundEnvelope)

    Implements the logic to recognize the last message in the sequence without relying on the TotalCount property.

    Declaration
    protected override bool IsLastMessage(IRawInboundEnvelope envelope)
    Parameters
    Type Name Description
    IRawInboundEnvelope envelope

    The envelope to be added to the sequence.

    Returns
    Type Description
    bool

    true if it is the last message, otherwise false.

    Overrides
    SequenceBase<IRawInboundEnvelope>.IsLastMessage(IRawInboundEnvelope)

    Implements

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