Skip to content
aaronontheweb avatar

Akka Net Best Practices

Best practices for Akka.NET covering EventStream vs DistributedPubSub, supervision, error handling, and DI-aware Props.

CCM score
67 of 100
skills.sh installs
477
GitHub stars
1.3K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers actor communication patterns, supervision strategies, error handling, Props versus DependencyResolver, work distribution, and cluster/local abstractions
  • Explains that EventStream is local to one process while DistributedPubSub reaches subscribers across cluster nodes, with per-user, per-entity, and broadcast topic designs
  • Clarifies that a supervision strategy governs an actor's children rather than the actor itself, and that the default OneForOneStrategy already rate-limits restarts
  • Guides when to use try-catch for expected failures versus letting unknown exceptions propagate to supervision, and when to pick plain Props versus DependencyResolver

Install

$ npx -y skills add aaronontheweb/dotnet-skills --skill akka-net-best-practices -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Akka.NET Best Practices

When to Use This Skill

Use this skill when:

  • Designing actor communication patterns
  • Deciding between EventStream and DistributedPubSub
  • Implementing error handling in actors
  • Understanding supervision strategies
  • Choosing between Props patterns and DependencyResolver
  • Designing work distribution across nodes
  • Creating testable actor systems that can run with or without cluster infrastructure
  • Abstracting over Cluster Sharding for local testing scenarios

Reference Files


1. EventStream vs DistributedPubSub

Critical: EventStream is LOCAL ONLY

Context.System.EventStream is local to a single ActorSystem process. It does NOT work across cluster nodes.

Details

Repository
github.com/aaronontheweb/dotnet-skills
Categories
.NET & C#, Backend & APIs
First seen
Jun 3, 2026

Questions

What is the akka-net-best-practices skill for?

akka-net-best-practices gives guidance on Akka.NET design choices such as EventStream versus DistributedPubSub, supervision strategies, error handling, Props versus DependencyResolver, and work distribution patterns. It also covers cluster and local mode abstractions that keep Akka.NET actor systems testable.

When should I use EventStream instead of DistributedPubSub in Akka.NET?

The akka-net-best-practices skill explains that EventStream is local to a single ActorSystem process and does not reach other cluster nodes. For events that must reach actors across several cluster nodes, it directs you to Akka.Cluster.Tools.PublishSubscribe through DistributedPubSub.

How do I install the akka-net-best-practices skill?

Run this command in a project: npx -y skills add aaronontheweb/dotnet-skills --skill akka-net-best-practices -y. Once installed, the skill lets your agent apply these Akka.NET best practices while you write actor code.

More from aaronontheweb/dotnet-skills

All 34

Similar to Akka Net Best Practices

More .NET & C#