Akka.Hosting Actor Patterns

•
423
•

Provides standardized patterns and extension methods for building testable, sharded entity actors using Akka.NET and Akka.Hosting.

This skill streamlines the development of entity-based actors in .NET by providing reusable patterns for message extraction, cluster sharding, and local testing. It introduces the GenericChildPerEntityParent pattern to mimic sharding behavior in non-clustered environments, ensuring code consistency between unit tests and production deployments. With built-in support for ITimeProvider for testable scheduling and akka-reminders for durable tasks, it helps developers build robust, scalable distributed systems that are maintainable and easy to verify.

主要功能

01GenericChildPerEntityParent for sharding-like behavior in unit tests
02423 GitHub stars
03Execution mode abstraction for seamless local vs. clustered switching
04Standardized IMessageExtractor implementations for consistent routing
05Fluent Akka.Hosting extension methods for clean actor registration
06Testable time-based logic via ITimeProvider and ActorSystem.Scheduler

使用场景

01Implementing durable scheduled tasks that persist across service restarts using Akka Reminders and PostgreSQL
02Creating unit tests for actor-based systems without the overhead of setting up a full Akka Cluster
03Building scalable domain entity actors like Orders or Users that require cluster sharding in production