Class ChunkSequenceReader
- Namespace
- Silverback.Messaging.Sequences.Chunking
- Assembly
- Silverback.Integration.dll
Creates a ChunkSequence containing all the chunks of the original message.
public class ChunkSequenceReader : SequenceReaderBase, ISequenceReader
- Inheritance
-
ChunkSequenceReader
- Implements
- Inherited Members
Constructors
ChunkSequenceReader()
Initializes a new instance of the ChunkSequenceReader class.
public ChunkSequenceReader()
Methods
CanHandleAsync(ConsumerPipelineContext)
Checks whether this reader can and must handle the message being processed in the specified context.
public override ValueTask<bool> CanHandleAsync(ConsumerPipelineContext context)
Parameters
contextConsumerPipelineContextThe current ConsumerPipelineContext.
Returns
- ValueTask<bool>
A Task<TResult> representing the asynchronous operation. The task result contains a value indicating whether this reader can and must handle the message.
CreateNewSequenceCore(string, ConsumerPipelineContext)
Creates the new sequence object.
protected override ISequence CreateNewSequenceCore(string sequenceId, ConsumerPipelineContext context)
Parameters
sequenceIdstringThe sequence identifier.
contextConsumerPipelineContextThe current ConsumerPipelineContext.
Returns
- ISequence
The new sequence.
GetSequenceIdAsync(ConsumerPipelineContext)
Gets the sequence identifier extracted from the current envelope.
protected override ValueTask<string> GetSequenceIdAsync(ConsumerPipelineContext context)
Parameters
contextConsumerPipelineContextThe current ConsumerPipelineContext.
Returns
- ValueTask<string>
A Task<TResult> representing the asynchronous operation. The task result contains the recognized sequence identifier, or
null.
IsNewSequenceAsync(string, ConsumerPipelineContext)
Determines if the current message corresponds with the beginning of a new sequence.
protected override ValueTask<bool> IsNewSequenceAsync(string sequenceId, ConsumerPipelineContext context)
Parameters
sequenceIdstringThe sequence identifier.
contextConsumerPipelineContextThe current ConsumerPipelineContext.
Returns
- ValueTask<bool>
A Task<TResult> representing the asynchronous operation. The task result contains
trueif a new sequence is starting; otherwisefalse.