Interface ISequenceReader
- Namespace
- Silverback.Messaging.Sequences
- Assembly
- Silverback.Integration.dll
Can recognize a message that belongs to a sequence and match it with the proper ISequence instance.
public interface ISequenceReader
Remarks
The messages skipped without being delivered, because filtered out (see Filter) or ignored because no subscriber handles them (see ThrowIfUnhandled), aren't added to the sequence they belong to and don't count toward its length. A custom sequence completed by its last message, or by a total length equal to the fixed number of messages it is made of, therefore isn't completed when that message (or any message, with a total length) is skipped, and is eventually aborted as incomplete. The built-in batches, chunked messages and streams aren't affected.
Properties
HandlesRawMessages
Gets a value indicating whether this reader handles the raw messages, before they are being deserialized, decrypted, etc.
bool HandlesRawMessages { get; }
Property Value
Methods
CanHandleAsync(ConsumerPipelineContext)
Checks whether this reader can and must handle the message being processed in the specified context.
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.
GetSequenceAsync(ConsumerPipelineContext)
Returns the ISequence related to the message being processed.
ValueTask<ISequence> GetSequenceAsync(ConsumerPipelineContext context)
Parameters
contextConsumerPipelineContextThe current ConsumerPipelineContext.
Returns
- ValueTask<ISequence>
A Task<TResult> representing the asynchronous operation. The task result contains the ISequence.