ActorSystemConfig class

The configuration for an actor system.

Constructors

ActorSystemConfig({MetricsCollector? metricsCollector, TraceCollector? traceCollector, LogCollector? logCollector, AskConfig? askConfig, int deadLetterQueueMaxSize = 1000, int? maxMessagesPerTurn, Duration? maxTurnDuration, Duration? blockingHandlerThreshold, Duration? stopTimeout, MailboxConfig mailbox = MailboxConfig.unbounded})
ActorSystemConfig.development({MetricsCollector? metricsCollector, TraceCollector? traceCollector, LogCollector? logCollector})
Creates a development-friendly configuration with longer timeouts and more retries.
factory
ActorSystemConfig.production({MetricsCollector? metricsCollector, TraceCollector? traceCollector, LogCollector? logCollector})
Creates a production configuration with shorter timeouts and fewer retries.
factory

Properties

askConfig → AskConfig
Configuration for ask pattern behavior including timeouts and retries.
final
blockingHandlerThreshold → Duration?
A handler that runs for longer than this before its first await is counted under the actors.blocking_handler metric, tagged with the actor's id. Defaults to 10 ms.
final
deadLetterQueueMaxSize → int
Maximum size of the dead letter queue before oldest entries are evicted.
final
hashCode → int
The hash code for this object.
no setterinherited
logCollector → LogCollector?
Where log records go. Defaults to ConsoleLogCollector.
final
mailbox → MailboxConfig
The mailbox of every actor spawned without one of its own. Unbounded by default.
final
maxMessagesPerTurn → int?
The most messages the system dispatches in one event-loop turn before yielding so that timers and I/O can run. Defaults to 128.
final
maxTurnDuration → Duration?
The longest the system keeps dispatching in one event-loop turn before yielding. Defaults to 4 ms. A single handler that blocks for longer than this still holds the isolate; see blockingHandlerThreshold.
final
metricsCollector → MetricsCollector?
Where metrics go. Defaults to NoOpMetricsCollector; pass an InMemoryMetricsCollector (bounded) or your own implementation to collect them.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stopTimeout → Duration?
How long a graceful stop or restart waits for the handler an actor is in the middle of. After that the actor is killed: the handler is cut off at the await it is suspended on. Defaults to 5 seconds.
final
traceCollector → TraceCollector?
Where message traces go. Defaults to NoOpTraceCollector; pass an InMemoryTraceCollector (bounded) or your own implementation to collect them. Tracing records every message sent and processed, so enable it deliberately.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited