Skip to content

InboundTriggerRateLimiter

Namespace AgentPrism · Assembly AgentPrism.Core.dll

Applies a fixed-window rate limit per inbound trigger.

public sealed class InboundTriggerRateLimiter

objectInboundTriggerRateLimiter

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

The limit lives in process memory: AgentPrism does not ship a distributed rate limiter. In a multi-instance deployment the limit applies PER INSTANCE, not per trigger across the whole deployment — the same documented scope as AgentPrismRateLimitOptions.

Hand-written rather than built on System.Threading.RateLimiting (the type AgentPrismRateLimitFilter uses): that namespace ships in the ASP.NET Core shared framework’s reference pack, which AgentPrism.Core — a plain class library with no dependency on ASP.NET Core — cannot see. A dispatcher that validates a signature and queues a job has no reason to depend on a web framework.

InboundTriggerRateLimiter(IOptionsMonitor<AgentPrismInboundTriggerOptions>, TimeProvider?)

Section titled “ InboundTriggerRateLimiter(IOptionsMonitor<AgentPrismInboundTriggerOptions>, TimeProvider?)”

Creates a new trigger rate limiter.

public InboundTriggerRateLimiter(IOptionsMonitor<AgentPrismInboundTriggerOptions> optionsMonitor, TimeProvider? timeProvider = null)

optionsMonitor IOptionsMonitor<AgentPrismInboundTriggerOptions>

The inbound trigger settings.

timeProvider TimeProvider?

The clock. Defaults to TimeProvider.System.

ArgumentNullException

optionsMonitor is null.

Tries to acquire one permit for the given trigger.

public bool TryAcquire(Guid triggerId)

triggerId Guid

The trigger identifier.

bool

true if the request is within the trigger’s per-minute limit.