dependabot[bot] on nuget
Bump MicrosoftLibVersion from 5… (compare)
dependabot[bot] on nuget
Bump Microsoft.Extensions.Hosti… (compare)
dependabot[bot] on nuget
Bump Microsoft.Extensions.Hosti… (compare)
dependabot[bot] on nuget
Bump BenchmarkDotNet from 0.13.… (compare)
dependabot[bot] on nuget
Bump System.Configuration.Confi… (compare)
dependabot[bot] on nuget
Bump DotNetty.Handlers from 0.6… (compare)
Hi
Just getting deeper into Akka.net here and I want to use a router with ConsistentHashing but I'm missing a key step. This my understanding:
`
public class MyMessage : IConsistentHashable
{
public readonly string P1;
/* some other properties *
public MyMessage (string p1)
{
this.P1 = p1;
}
public object ConsistentHashKey
{
get
{
return this.P1;
}
}
}
public class ActorSystemSetup
{
public ActorSystemSetup() {
/* make some actors for the router here */
var actors = new string[] {/* list of actors */};
var mapping = new ConsistentHashMapping(/* something here that associates MyMessage.P1 with one of the actors */);
var props = Props.Empty.WithRouter(new ConsistentHashingGroup(actors).WithHashMapping(mapping));
actorSystem.ActorOf(props, "router-name");
}
}
`
So I'm possibly one line away from awesome. Can someone help me out?