Table of Contents

Interface IFirestoreCdcBuilder

Namespace
Excalibur.Cdc.Firestore
Assembly
Excalibur.Cdc.Firestore.dll

Fluent builder interface for configuring Firestore CDC settings.

public interface IFirestoreCdcBuilder

Remarks

This builder configures Firestore-specific CDC options such as collection path, processor name, batch size, and state store connections. All methods return this for method chaining.

Methods

BindConfiguration(string)

Binds Firestore CDC source options from an IConfiguration section.

IFirestoreCdcBuilder BindConfiguration(string sectionPath)

Parameters

sectionPath string

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

Returns

IFirestoreCdcBuilder

The builder for fluent chaining.

Client(FirestoreDb)

Sets a pre-configured FirestoreDb client.

IFirestoreCdcBuilder Client(FirestoreDb client)

Parameters

client FirestoreDb

Returns

IFirestoreCdcBuilder

ClientFactory(Func<IServiceProvider, FirestoreDb>)

Sets a factory that resolves a FirestoreDb from DI.

IFirestoreCdcBuilder ClientFactory(Func<IServiceProvider, FirestoreDb> clientFactory)

Parameters

clientFactory Func<IServiceProvider, FirestoreDb>

Returns

IFirestoreCdcBuilder

CollectionPath(string)

Sets the Firestore collection path to watch for changes.

IFirestoreCdcBuilder CollectionPath(string collectionPath)

Parameters

collectionPath string

The collection path (e.g., "orders" or "organizations/org1/members").

Returns

IFirestoreCdcBuilder

The builder for fluent chaining.

CredentialsJson(string)

Sets the JSON content of the service account credentials.

IFirestoreCdcBuilder CredentialsJson(string credentialsJson)

Parameters

credentialsJson string

Returns

IFirestoreCdcBuilder

CredentialsPath(string)

Sets the path to the service account JSON credentials file.

IFirestoreCdcBuilder CredentialsPath(string credentialsPath)

Parameters

credentialsPath string

Returns

IFirestoreCdcBuilder

EmulatorHost(string)

Sets the Firestore emulator host for local development (e.g., "localhost:8080").

IFirestoreCdcBuilder EmulatorHost(string emulatorHost)

Parameters

emulatorHost string

Returns

IFirestoreCdcBuilder

MaxBatchSize(int)

Sets the maximum number of events to process per batch.

IFirestoreCdcBuilder MaxBatchSize(int maxBatchSize)

Parameters

maxBatchSize int

The maximum batch size.

Returns

IFirestoreCdcBuilder

The builder for fluent chaining.

PollInterval(TimeSpan)

Sets the interval between checking for new changes when idle.

IFirestoreCdcBuilder PollInterval(TimeSpan interval)

Parameters

interval TimeSpan

The poll interval.

Returns

IFirestoreCdcBuilder

The builder for fluent chaining.

ProcessorName(string)

Sets the unique processor name for this CDC instance.

IFirestoreCdcBuilder ProcessorName(string processorName)

Parameters

processorName string

The processor name.

Returns

IFirestoreCdcBuilder

The builder for fluent chaining.

ProjectId(string)

Sets the Google Cloud project ID.

IFirestoreCdcBuilder ProjectId(string projectId)

Parameters

projectId string

Returns

IFirestoreCdcBuilder

WithStateStore(Action<ICdcStateStoreBuilder>)

Configures a separate connection for CDC state persistence.

IFirestoreCdcBuilder WithStateStore(Action<ICdcStateStoreBuilder> configure)

Parameters

configure Action<ICdcStateStoreBuilder>

An action to configure state store settings including project ID and collection.

Returns

IFirestoreCdcBuilder

The builder for fluent chaining.

Remarks

Firestore uses project IDs instead of connection strings. Use ConnectionString to set the project ID. When omitted, the source FirestoreDb is used for state persistence.

Exceptions

ArgumentNullException

Thrown when configure is null.