Hello,
We are running Akka 2.4.18. We have a singleton that is created on all
nodes in the cluster(for example three nodes). At some point in the life
time of the singleton we no longer need it on any of the nodes but later
need to recreate it. Is there a way to stop the singleton on all nodes then
recreate it later. What we have found is if we stop(context stop self) the
singleton actor on one node and then try to recreate the singleton on the
same node using the code below the ClusterSingletonManager still thinks the
singleton exists (i.e ""VideoTranscodeSingletonSagaSubscriber:
VideoTranscodeSingletonSaga actor already exists.") and the proxy we create
can not find it. From what I can tell the ClusterSingletonManager has no
idea that the singleton has been stopped using "context stop self" inside
the singleton and somehow messages being sent to the proxy can not find the
singleton anymore.
Try {
context.system.actorOf(
ClusterSingletonManager.props(
singletonProps = props,
terminationMessage = PoisonPill,
settings = ClusterSingletonManagerSettings(context.system)
),
name = singletonName
)
} match {
case Success(videoTranscodeSingletonSaga: ActorRef) =>
log.debug("VideoTranscodeSingletonSagaSubscriber:
VideoTranscodeSingletonSaga created.", Map("singletonName" -> singletonName))
case Failure(ex) => ex match {
case InvalidActorNameException(ex) =>
log.debug("VideoTranscodeSingletonSagaSubscriber:
VideoTranscodeSingletonSaga actor already exists.", Map("singletonName" ->
singletonName))
case _ =>
log.error("VideoTranscodeSingletonSagaSubscriber failed to create or find
actor.", Map("singletonName" -> singletonName))
}
}
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.