Table of Contents

Class ChunkSequenceWriter

Namespace
Silverback.Messaging.Sequences.Chunking
Assembly
Silverback.Integration.dll

Creates the chunks sequence according to the ChunkSettings.

public class ChunkSequenceWriter : ISequenceWriter
Inheritance
ChunkSequenceWriter
Implements
Inherited Members

Constructors

ChunkSequenceWriter(IChunkEnricherFactory, IServiceProvider)

Initializes a new instance of the ChunkSequenceWriter class.

public ChunkSequenceWriter(IChunkEnricherFactory chunkEnricherFactory, IServiceProvider serviceProvider)

Parameters

chunkEnricherFactory IChunkEnricherFactory

The IChunkEnricherFactory.

serviceProvider IServiceProvider

The IServiceProvider.

Methods

CanHandle(IOutboundEnvelope)

Checks whether this writer can and must handle the specified message.

public bool CanHandle(IOutboundEnvelope envelope)

Parameters

envelope IOutboundEnvelope

The envelope containing the message to be handled.

Returns

bool

A value indicating whether this writer can and must handle the message.

ProcessMessageAsync(IOutboundEnvelope)

Sets the headers used to match the message with the sequence it belongs to. If needed it can also split a single message into multiple messages.

public IAsyncEnumerable<IOutboundEnvelope> ProcessMessageAsync(IOutboundEnvelope envelope)

Parameters

envelope IOutboundEnvelope

The envelope containing the message to be handled.

Returns

IAsyncEnumerable<IOutboundEnvelope>

An IAsyncEnumerable<T> with the envelopes containing the messages to be produced.