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, 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 sourceAddCoreAsync(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
| Improve this doc View sourceIsLastMessage(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 |
|