Table of Contents

Interface IMongoDbCdcBuilder

Namespace
Excalibur.Cdc.MongoDB
Assembly
Excalibur.Cdc.MongoDB.dll

Fluent builder interface for configuring MongoDB CDC settings.

public interface IMongoDbCdcBuilder
Extension Methods

Remarks

This builder configures MongoDB-specific CDC options such as connection string, database name, collection names, change stream settings, and state store connections. All methods return this for method chaining.

Methods

BindConfiguration(string)

Binds MongoDB CDC source options from an IConfiguration section.

IMongoDbCdcBuilder BindConfiguration(string sectionPath)

Parameters

sectionPath string

The configuration section path (e.g., "Cdc:MongoDB").

Returns

IMongoDbCdcBuilder

The builder for fluent chaining.

Client(IMongoClient)

Sets a pre-configured MongoDB.Driver.IMongoClient instance for the CDC source.

IMongoDbCdcBuilder Client(IMongoClient client)

Parameters

client IMongoClient

The MongoDB client.

Returns

IMongoDbCdcBuilder

The builder for fluent chaining.

ClientFactory(Func<IServiceProvider, IMongoClient>)

Sets a factory that resolves an MongoDB.Driver.IMongoClient from DI.

IMongoDbCdcBuilder ClientFactory(Func<IServiceProvider, IMongoClient> clientFactory)

Parameters

clientFactory Func<IServiceProvider, IMongoClient>

A factory returning an MongoDB.Driver.IMongoClient.

Returns

IMongoDbCdcBuilder

The builder for fluent chaining.

CollectionNames(params string[])

Sets the collection names to watch for changes.

IMongoDbCdcBuilder CollectionNames(params string[] collectionNames)

Parameters

collectionNames string[]

The collection names to watch.

Returns

IMongoDbCdcBuilder

The builder for fluent chaining.

ConnectionString(string)

Sets the MongoDB connection string for the CDC source.

IMongoDbCdcBuilder ConnectionString(string connectionString)

Parameters

connectionString string

The MongoDB connection string.

Returns

IMongoDbCdcBuilder

The builder for fluent chaining.

DatabaseName(string)

Sets the database name for CDC processing.

IMongoDbCdcBuilder DatabaseName(string databaseName)

Parameters

databaseName string

The database name.

Returns

IMongoDbCdcBuilder

The builder for fluent chaining.

ProcessorId(string)

Sets the unique processor identifier for this CDC instance.

IMongoDbCdcBuilder ProcessorId(string processorId)

Parameters

processorId string

The processor identifier.

Returns

IMongoDbCdcBuilder

The builder for fluent chaining.