Created
May 26, 2017 10:16
-
-
Save Danthar/e29493c7ed58eb9e3518df1bd7b3c0a3 to your computer and use it in GitHub Desktop.
Akka.net cluster singleton example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cluster { | |
seed-nodes = ["akka.tcp://TradingRoomActors@localhost:8083"] | |
roles = ["traderworker"] | |
singleton { | |
singleton-name = "TraderActor" | |
role = "traderworker" | |
hand-over-retry-interval = 1s | |
} | |
singleton-proxy { | |
singleton-name = "TradesActor" | |
role = "tradesworker" | |
singleton-identification-interval = 1s | |
buffer-size = 100 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cluster { | |
seed-nodes = ["akka.tcp://TradingRoomActors@localhost:8083"] | |
roles = ["tradesworker"] | |
singleton { | |
singleton-name = "TradesActor" | |
role = "tradesworker" | |
hand-over-retry-interval = 1s | |
} | |
singleton-proxy { | |
singleton-name = "TraderActor" | |
role = "traderworker" | |
singleton-identification-interval = 1s | |
buffer-size = 100 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Greatsamps Adding these configs should make your sample work OOB.
Alternatively you can change your Boostrap method to something like this:
With for example when creating a proxy for the TradesActor:
var proxy = tradingRoomActors.BootstrapSingletonProxy("TradesActor","tradesworker","/user/TradesActor", "tradesActorProxy");