Darren Ford
Darren Ford

Reputation: 251

What's the best way to broadcast a message to Akka.Net ConsistentHashingPool routees?

This...

hasPoolRouter.Tell(new Broadcast(new SendStatus()))

Does not work. The message only makes it to the Routee where the Consistent Hash Id matches which defeats the purpose of Broadcast.

the router actor is defined like this:

hasPoolRouter = ... .WithRouter(new ConsistentHashingPool(4))

Upvotes: 0

Views: 337

Answers (1)

Darren Ford
Darren Ford

Reputation: 251

I was intending to have a pool of these locally and was running in a clustered configuration and only one was created locally...so the broadcast was only going to the one local instance. I also made a mistake in the configuration and had two configs using the same actor route making things worse. Good thing that came out of it is that I better understand how this stuff works by screwing it up.

For clarification I had both a clustered one and a non-clustered one configured at the same actor path. I was sending the broadcast to the clustered IActorRef and it was delivered to only one of the multiple pooled non clustered ones. IF I had been running two nodes then two would have received it but not all and may have clued me in.

Upvotes: 0

Related Questions