Table of Contents

Class ProjectionOptions

Namespace
Opossum.Projections
Assembly
Opossum.dll

Configuration options for the projection system

public sealed class ProjectionOptions
Inheritance
ProjectionOptions
Inherited Members

Properties

AutoRebuild

Controls how the projection daemon handles projections at startup. Default: MissingCheckpointsOnly

public AutoRebuildMode AutoRebuild { get; set; }

Property Value

AutoRebuildMode

BatchSize

Maximum number of events to process in a single batch Default: 1000

[Range(1, 100000, ErrorMessage = "BatchSize must be between 1 and 100,000")]
public int BatchSize { get; set; }

Property Value

int

MaxConcurrentRebuilds

Maximum number of projections to rebuild concurrently.

DISK TYPE RECOMMENDATIONS:

  • HDD (single disk): 2-4
  • SSD: 4-8
  • NVMe SSD: 8-16
  • RAID array: 16-32

IMPORTANT: Higher values improve rebuild speed but increase:

  • CPU usage (may slow HTTP requests)
  • Memory usage (all events loaded in parallel)
  • Disk I/O contention

Default: 4 (balanced for most scenarios)

[Range(1, 64, ErrorMessage = "MaxConcurrentRebuilds must be between 1 and 64")]
public int MaxConcurrentRebuilds { get; set; }

Property Value

int

PollingInterval

How often the projection daemon polls for new events Default: 5 seconds

[Range(typeof(TimeSpan), "00:00:00.100", "01:00:00", ErrorMessage = "PollingInterval must be between 100ms and 1 hour")]
public TimeSpan PollingInterval { get; set; }

Property Value

TimeSpan

RebuildBatchSize

Maximum number of events to load per batch during a projection rebuild.

Lower values reduce peak memory usage but increase the number of index reads (each batch re-reads the event-type position index). Higher values reduce I/O round-trips but use more memory.

GUIDANCE:

  • Constrained memory (<512 MB heap): 1 000 – 5 000
  • Normal workloads: 5 000 (default)
  • High-memory / fast NVMe: 10 000 – 50 000

Default: 5 000

[Range(100, 1000000, ErrorMessage = "RebuildBatchSize must be between 100 and 1,000,000")]
public int RebuildBatchSize { get; set; }

Property Value

int

RebuildFlushInterval

Number of events processed between rebuild journal flushes.

Controls the maximum re-work required on crash recovery. After every RebuildFlushInterval events the rebuilder persists a journal checkpoint and the current tag accumulator to disk. If the process crashes, at most this many events need to be re-processed.

GUIDANCE:

  • Lower values = more durable, but more journal write overhead
  • Higher values = less journal overhead, but more re-work on recovery
  • Very low values (<1 000) may noticeably slow down rebuilds due to frequent I/O

Default: 10 000

[Range(100, 1000000, ErrorMessage = "RebuildFlushInterval must be between 100 and 1,000,000")]
public int RebuildFlushInterval { get; set; }

Property Value

int

ScanAssemblies

Assemblies to scan for projection definitions

public List<Assembly> ScanAssemblies { get; }

Property Value

List<Assembly>

Methods

ScanAssembly(Assembly)

Adds an assembly to scan for projection definitions

public ProjectionOptions ScanAssembly(Assembly assembly)

Parameters

assembly Assembly

Assembly to scan

Returns

ProjectionOptions

This options instance for fluent configuration