Interface IInMemoryCdcBuilder
Fluent builder interface for configuring in-memory CDC settings.
public interface IInMemoryCdcBuilder
Examples
cdc.UseInMemory(mem =>
{
mem.ProcessorId("test-processor")
.BatchSize(10)
.PreserveHistory(true);
});
Remarks
This builder configures in-memory CDC options for testing scenarios.
All methods return this for method chaining.
Methods
AutoFlush(bool)
Sets whether to automatically flush changes after each batch.
IInMemoryCdcBuilder AutoFlush(bool autoFlush = true)
Parameters
autoFlushboolWhether to auto-flush.
Returns
- IInMemoryCdcBuilder
The builder for fluent chaining.
Remarks
Default is true.
BatchSize(int)
Sets the batch size for CDC change processing.
IInMemoryCdcBuilder BatchSize(int size)
Parameters
sizeintThe batch size.
Returns
- IInMemoryCdcBuilder
The builder for fluent chaining.
Remarks
Default is 100.
Exceptions
- ArgumentOutOfRangeException
Thrown when
sizeis not positive.
PreserveHistory(bool)
Sets whether to preserve changes in history after processing.
IInMemoryCdcBuilder PreserveHistory(bool preserveHistory = true)
Parameters
preserveHistoryboolWhether to preserve history.
Returns
- IInMemoryCdcBuilder
The builder for fluent chaining.
Remarks
Default is false. Enable this to access processed changes via GetHistory().
ProcessorId(string)
Sets the processor identifier for this CDC processor instance.
IInMemoryCdcBuilder ProcessorId(string processorId)
Parameters
processorIdstringThe processor identifier.
Returns
- IInMemoryCdcBuilder
The builder for fluent chaining.
Remarks
Default is "inmemory-cdc".
Exceptions
- ArgumentException
Thrown when
processorIdis null or whitespace.