On Wednesday, March 5, 2014 10:10:41 PM UTC-10, Björn Antonsson wrote: > > Hi Jim, > > On 6 March 2014 at 07:45:19, Jim Newsham ([email protected] <javascript:>) > wrote: > > > > On Monday, March 3, 2014 4:55:04 PM UTC-10, Jim Newsham wrote: >> >> Does Akka provide a means to stop/start the remoting subsystem? >> > > Can anyone confirm whether this is supported in Akka or not? > > > It is not possibe to only shut down the remoting subsystem in Akka and > keep the ActorSystem running. The remoting transports are internal to the > RemoteActorRefProvider and you really can’t access them from the outside. > > > > > And if not, any suggestions on how we might be able to add this > functionality? I've spent a bit of time reading the source, however I'm a > Java developer with not too much experience in Scala. I suspect I should > be able to add a disconnect functionality by implementing a transport > adapter, but I don't know how I would get access to the appropriate object > to initiate the disconnect command. I see how transport adapters are > layered and pass management commands down the stack, but I haven't found > where (if at all) user-level code can inject management commands into the > transport. > > > So I’m still not sure that I understand what you would gain from shutting > down the communication. The remoting does a lot of things under the hood, > like failure detection, and will probably try to open up the communication > again. > Here's an analogy: the writers of Socket provide a close() method, because lacking such mechanism, the only way to close a socket connection would be via System.exit(), which would be very restrictive. Bringing it back to Akka, it seems like the only way to shut down remote communication is to stop the actor system, which to me is restrictive, and also quite surprising.
If I implemented a way to shut down the transport, I understand that the remoting system would continue to attempt to reconnect periodically according to the configured parameters. My assumption is that this would be relatively harmless. > > There is a transport adapter that we use for testing that can drop packets > and is controlled from the test code. It could be used as a starting point. > > > https://github.com/akka/akka/blob/master/akka-remote/src/main/scala/akka/remote/transport/FailureInjectorTransportAdapter.scala > Thanks, I'll look into this. Jim > B/ > > > > > Thanks! > Jim > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: http://akka.io/faq/ > >>>>>>>>>> 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] <javascript:>. > To post to this group, send email to [email protected]<javascript:> > . > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- > Björn Antonsson > Typesafe <http://typesafe.com/> – Reactive Apps on the JVM > twitter: @bantonsson <http://twitter.com/#!/bantonsson> > > -- >>>>>>>>>> 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 http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
