Table of Contents

Class CdcHealthState

Namespace
Excalibur.Cdc.Diagnostics
Assembly
Excalibur.Cdc.dll

Thread-safe state tracker for CDC processor health monitoring.

public sealed class CdcHealthState
Inheritance
CdcHealthState
Inherited Members

Remarks

The CDC processor updates this state during processing. Health checks read from it to determine processor health status.

Register as a singleton in DI:

services.AddSingleton<CdcHealthState>();

Properties

ConsecutiveTransientFailures

Gets the number of consecutive transient failures a streaming processor has reported without making progress.

public int ConsecutiveTransientFailures { get; }

Property Value

int

Zero while the processor is making progress.

IsRunning

Gets a value indicating whether the processor is currently running.

public bool IsRunning { get; }

Property Value

bool

true if the processor is running; otherwise, false.

LastActivityTime

Gets the time of the last processing activity.

public DateTimeOffset? LastActivityTime { get; }

Property Value

DateTimeOffset?

The last activity time, or null if no activity has occurred.

TotalCycles

Gets the total number of processing cycles completed.

public long TotalCycles { get; }

Property Value

long

The total cycle count.

TotalFailed

Gets the total number of failed events since the processor started.

public long TotalFailed { get; }

Property Value

long

The total failed count.

TotalProcessed

Gets the total number of events processed since the processor started.

public long TotalProcessed { get; }

Property Value

long

The total processed count.

Methods

MarkStarted()

Marks the processor as started.

public void MarkStarted()

MarkStopped()

Marks the processor as stopped.

public void MarkStopped()

RecordConsecutiveTransientFailures(int)

Records the current count of consecutive transient failures, as reported by a processor's reconnect loop.

public void RecordConsecutiveTransientFailures(int count)

Parameters

count int

The count; zero once the processor makes progress again.

RecordCycle(int, int)

Records processed events.

public void RecordCycle(int processedCount, int failedCount)

Parameters

processedCount int

The number of events processed.

failedCount int

The number of events that failed.