Table of Contents

Class MongoDbMaterializedViewStoreOptions

Namespace
Excalibur.Data.MongoDB.MaterializedViews
Assembly
Excalibur.Data.MongoDB.dll

Configuration options for MongoDbMaterializedViewStore.

public sealed class MongoDbMaterializedViewStoreOptions
Inheritance
MongoDbMaterializedViewStoreOptions
Inherited Members

Fields

DefaultPositionsCollectionName

Default positions collection name.

public const string DefaultPositionsCollectionName = "materialized_view_positions"

Field Value

string

DefaultViewsCollectionName

Default views collection name.

public const string DefaultViewsCollectionName = "materialized_views"

Field Value

string

Properties

ConnectTimeoutSeconds

Gets or sets the connection timeout in seconds.

[Range(1, 2147483647)]
public int ConnectTimeoutSeconds { get; set; }

Property Value

int

The timeout in seconds. Defaults to 10.

ConnectionString

Gets or sets the MongoDB connection string.

[Required]
public string ConnectionString { get; set; }

Property Value

string

The connection string. Required.

DatabaseName

Gets or sets the database name.

[Required]
public string DatabaseName { get; set; }

Property Value

string

The database name. Required.

MaxPoolSize

Gets or sets the maximum connection pool size.

[Range(1, 2147483647)]
public int MaxPoolSize { get; set; }

Property Value

int

The max pool size. Defaults to 100.

PositionsCollectionName

Gets or sets the collection name for position tracking.

[Required]
public string PositionsCollectionName { get; set; }

Property Value

string

The positions collection name. Defaults to "materialized_view_positions".

ServerSelectionTimeoutSeconds

Gets or sets the server selection timeout in seconds.

[Range(1, 2147483647)]
public int ServerSelectionTimeoutSeconds { get; set; }

Property Value

int

The timeout in seconds. Defaults to 30.

UseSsl

Gets or sets a value indicating whether to use SSL/TLS.

public bool UseSsl { get; set; }

Property Value

bool

true to use TLS; otherwise, false. Defaults to false.

UseTransactions

Gets or sets a value indicating whether view+position writes use a multi-document ACID transaction for crash-atomic exactly-once persistence.

public bool UseTransactions { get; set; }

Property Value

bool

true to persist the view and its checkpoint in one transaction (requires a MongoDB replica set or sharded cluster); otherwise false (the default) for the portable at-least-once path — the view is written before the position, so a crash re-processes the event and the idempotent builder Apply makes replay safe (no data loss, no double-count).

Remarks

Left false by default so standalone MongoDB works without forcing replica-set infrastructure. Enable it only when the deployment is a replica set / sharded cluster.

ViewsCollectionName

Gets or sets the collection name for materialized views.

[Required]
public string ViewsCollectionName { get; set; }

Property Value

string

The views collection name. Defaults to "materialized_views".

Methods

Validate()

Validates that required options are set.

public void Validate()

Exceptions

InvalidOperationException

Thrown when required options are missing.