Table of Contents

Interface IProcessingGate

Namespace
Excalibur.Dispatch
Assembly
Excalibur.Dispatch.Abstractions.dll

Gate that controls whether background processing should execute on this instance.

public interface IProcessingGate
Extension Methods

Remarks

When registered in DI, outbox and inbox background services (and background jobs) check this gate before each processing cycle. If ShouldProcess returns false, the cycle is skipped and the service waits for the next polling interval.

The primary use case is leader election: only the leader instance processes outbox/inbox messages. Register via WithLeaderElection() on the outbox or inbox builder.

Properties

ShouldProcess

Gets a value indicating whether processing should proceed.

bool ShouldProcess { get; }

Property Value

bool

true if processing should proceed; otherwise, false.