Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to configure a Akka Pub/Sub to run on same machine?

I am following the Distributed Publish Subscribe in Cluster example in Akka. However, I would like to run all the actor (publisher and subscribers) on the same node (my laptop). I am not sure if I understand how to configure that, could somebody help me? is it possible to use the runOn or should it be declared in a configuration file? Currently, I run into this error:

Caused by: akka.ConfigurationException: ActorSystem [akka://mySystem] 
needs to have a 'ClusterActorRefProvider' enabled in the 
configuration, currently uses [akka.actor.LocalActorRefProvider]
like image 706
stian Avatar asked Sep 19 '16 08:09

stian


1 Answers

Your error is telling you what the problem is. In your application.conf you should set akka.actor.provider = "akka.cluster.ClusterActorRefProvider". If you want to use a 1 node cluster on your laptop you should also set akka.cluster.min-nr-of-members = 1.

like image 173
rgcase Avatar answered Nov 02 '22 21:11

rgcase