Class ChunkSequence
Represents a sequence of chunks that belong to the same message.
Inherited Members
Namespace: Silverback.Messaging.Sequences.Chunking
Assembly: Silverback.Integration.dll
Syntax
public class ChunkSequence : RawSequence, ISequence, IDisposable
Constructors
| Improve this doc View sourceChunkSequence(String, Nullable<Int32>, ConsumerPipelineContext)
Initializes a new instance of the ChunkSequence class.
Declaration
public ChunkSequence(string sequenceId, int? totalLength, ConsumerPipelineContext context)
Parameters
Type | Name | Description |
---|---|---|
System.String | sequenceId | The identifier that is used to match the consumed messages with their belonging sequence. |
System.Nullable<System.Int32> | 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 sourceAddCoreAsync(IRawInboundEnvelope, ISequence, Boolean)
Adds the message to the sequence.
Declaration
protected override Task<AddToSequenceResult> AddCoreAsync(IRawInboundEnvelope envelope, ISequence sequence, bool throwIfUnhandled)
Parameters
Type | Name | Description |
---|---|---|
IRawInboundEnvelope | envelope | |
ISequence | sequence | The sequence to be added to the sequence. |
System.Boolean | throwIfUnhandled | A boolean value indicating whether an exception must be thrown if no subscriber is handling the message. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<AddToSequenceResult> | A System.Threading.Tasks.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
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 |
Returns
Type | Description |
---|---|
System.Boolean |
|