akka-net-best-practices

Consolidate Akka.NET actor-design guidance into actionable patterns for reliable systems.

1.1k|101|Updated Nov 12, 2025
One-click install
npx skills add https://github.com/Aaronontheweb/dotnet-skills --skill akka-net-best-practices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: akka-net-best-practices
Source: https://github.com/Aaronontheweb/dotnet-skills/tree/main/skills/akka-best-practices
Command: npx skills add https://github.com/Aaronontheweb/dotnet-skills --skill akka-net-best-practices

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers design resilient Akka.NET actor systems by clarifying best practices for messaging, fault handling, and system architecture.

Core Features & Use Cases

  • EventStream vs DistributedPubSub guidance: when to use local event streams versus cluster-wide publish/subscribe.
  • Supervision strategies: patterns for fault containment, restarts, and child lifecycle management.
  • Error handling patterns: guiding when to catch, escalate, or let the supervision tree handle failures.
  • Props vs DependencyResolver: guidance on when to use simple Props and when to integrate DI containers for complex dependencies.
  • Work distribution patterns: approaches for scaling work across nodes and within a single node, including routing and batching.

Quick Start

Start with a minimal Akka.NET setup that uses local EventStream, apply a supervision strategy, and observe fault handling across a small actor hierarchy.

Frequently Asked Questions about akka-net-best-practices

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

FAQPage Schema
When should I use EventStream versus DistributedPubSub in Akka.NET?

EventStream handles local in-process actor messaging within a single node, while DistributedPubSub extends publish/subscribe messaging cluster-wide across multiple nodes. This Skill clarifies selecting the correct messaging primitive for your actor system topology.

How do I design supervision strategies for fault tolerance in Akka.NET?

Define supervision strategies in Akka.NET by establishing restart policies and child lifecycle management for fault containment. This Skill outlines error handling patterns for when to catch exceptions, escalate failures, or let the supervision tree handle actor restarts.

Should I use Props or DependencyResolver for creating actors in Akka.NET?

Use simple Props for basic actor instantiation and DependencyResolver when integrating DI containers for complex actor dependencies. This Skill provides guidance on choosing between Props and DependencyResolver patterns to balance maintainability and integration.

What are the best work distribution patterns for scaling Akka.NET actors?

Scaling Akka.NET actors uses routing and batching patterns to distribute work across cluster nodes or within a single node. This Skill covers work distribution approaches for scaling actor systems efficiently across typical enterprise scenarios.

How do I handle actor failures and restarts in an Akka.NET cluster?

Handle actor failures in an Akka.NET cluster by configuring supervision trees with appropriate restart policies for fault containment. This Skill enforces safe messaging patterns and restart policies to improve system resilience and maintainability across distributed nodes.