akka-hosting-actor-patterns

Build entity actors with Akka.Hosting for local and clustered execution.

57|7|Updated Aug 6, 2025
One-click install
npx skills add https://github.com/seiggy/lucia-dotnet --skill akka-hosting-actor-patterns-seiggy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: akka-hosting-actor-patterns
Source: https://github.com/seiggy/lucia-dotnet/tree/main/.github/skills/akka-hosting-actor-patterns
Command: npx skills add https://github.com/seiggy/lucia-dotnet --skill akka-hosting-actor-patterns-seiggy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides reusable patterns and best practices for building scalable and testable actor systems using Akka.Hosting, addressing common challenges in actor lifecycle management, message routing, and dependency injection.

Core Features & Use Cases

  • Execution Mode Abstraction: Write actor code that works seamlessly in both local unit tests and clustered production environments.
  • Cluster Sharding Patterns: Implement robust entity actor management using Akka.Cluster.Sharding abstractions.
  • Testability Enhancements: Utilize ITimeProvider for time-based logic and GenericChildPerEntityParent for local testing.
  • Use Case: Develop a new microservice that requires managing thousands of user-specific entities. This Skill helps you structure your actors for efficient scaling and reliable operation, ensuring they are easily testable before deployment.

Quick Start

Use the akka-hosting-actor-patterns skill to configure a new order actor with support for both local and clustered modes.

Frequently Asked Questions about akka-hosting-actor-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build testable Akka.NET actors that work in both local and clustered environments?

You can build testable Akka.NET actors by abstracting execution modes, allowing the same actor code to run seamlessly in local unit tests and clustered production using Akka.Hosting patterns.

What is the best way to manage dependency injection scope within Akka.Hosting actors?

Managing dependency injection scope within Akka.Hosting actors requires specific patterns to handle actor lifecycles correctly, ensuring injected dependencies resolve appropriately without violating actor isolation boundaries.

How does cluster sharding work with child-per-entity parent actors in Akka.NET?

Cluster sharding with child-per-entity parent actors in Akka.NET uses generic parent abstractions and message extractors to route messages to specific entity actors distributed across a production cluster.

Can I use ITimeProvider to test time-based logic in Akka.NET actors?

Yes, you can use ITimeProvider to test time-based logic in Akka.NET actors by injecting it into your actor system, allowing you to control and mock time progression during local unit testing.

How do I integrate Akka.Reminders with entity actors for scheduled message delivery?

You integrate Akka.Reminders with entity actors by utilizing built-in scheduling abstractions provided in the pattern set, enabling reliable timed message delivery for your child-per-entity actors.

Does Akka.Hosting support generic child-per-entity parent actors for local testing?

Yes, Akka.Hosting supports generic child-per-entity parent actors, providing abstractions that allow you to simulate clustered entity management behaviors locally for reliable unit testing before deployment.