I was looking on the Akka source code. There is a way to get a member's roles (.getRoles
), but is there a way to add a new role to existing member? I would like to add it dynamically using code and not via configuration.
Asked
Active
Viewed 111 times
0

om-nom-nom
- 62,329
- 13
- 183
- 228

user3779650
- 46
- 4
-
1@Jawa the concepts of membership and roles refers **specifically to akka-cluster**. Why did [you dropped it out of tag list](https://stackoverflow.com/posts/24432758/revisions)? – om-nom-nom Jun 26 '14 at 14:50
-
The question was redundantly double-tagged as both Akka and Akka-cluster but it mentioned cluster nowhere in the question. Sorry about that. – Jawa Jun 28 '14 at 14:27
1 Answers
2
No, roles are immutable and cannot be changed after an ActorSystem has been started.
You can change the role programmatically before creating the ActorSystem by loading your config file and then overriding the roles value before passing the config object to ActorSystem.apply
when you initially bootstrap a node.

Ryan
- 7,227
- 5
- 29
- 40