You can call run from anywhere, e.g. instead of calling system.terminate()
you can call CoordinatedShutdown(system).run().
By default it will also run automatically when the JVM process exists, e.g.
you call java.lang.System.exit or on kill SIGTERM signal.
run is idempotent so you can call it
I was considering using CoordinatedShutdown to shutdown Kamon, either with
PhaseBeforeActorSystemTerminate or with addJvmShutdownHook
But it seems I have to explicitly call run(). Where would I do that?
Not using Akka Cluster in this app.
Thanks.
val system = ActorSystem("test")
Hi,
as you are well aware, running multiple separate Akka clusters increases
operational/administrative burden for your application. Of course some
applications need to run in separate clusters because of security /
compliance constraints. But other than that, the more idiomatic way would
be
I may have misunderstood what you're trying to do but I think you can
probably use expand for this. In builder pseudocode, something like:
Flow ~> Unzip ~> ~> Zip
~> Flow.expand(Iterator.continually(_))~>
The expand step will duplicate the last element it received which