score:0
your problem here is that youre at the flow-level, so when this is used there is nothing indicating when would be the correct time for the actor to be destroyed. you could let the actor schedule a poison pill for himself after some idle time, but that looks like ugly design. therefore, what levi ramsey proposes looks like your cleanest option. another one would be to pass an indicator object for the graph state and if that indicates that currently the last element flows through it, a poison pill can be sent after asking.
Source: stackoverflow.com
Related Query
- How to release resources when tearing down an Akka graph?
- How can one verify messages sent to self are delivered when testing Akka actors?
- How to configure sbt to load resources when running application?
- How to clean up other resources when spark gets stopped
- Akka Streams - How to keep materialized value of an auxiliary Sink in a Graph
- How to test an akka stream closed shape runnable graph with an encapsulated source and sink
- How to run Akka Streams graph on a separate dispatcher with timeout?
- How can I reload akka scheduler when Play framework restart
- How to disable Akka error messages when client actor disconnect from remote actor?
- How to explain this Akka Streams graph from official doc?
- How to shut down the dispatcher thread in akka ActorSystem
- How to ensure message consistency when using futures in Akka
- How to make cleanup when creating a source stream from iterator with Akka stream?
- Akka Streams - How do I create a runnable Graph dynamically at runtime?
- Akka HTTP WebSocket Server How to declare Source based on Sink content when building Flow for message handlement?
- How to permanently disable javadsl namespace when coding with Akka Streams
- How does Akka 2.4.x work in A Cluster Application when I loose one of my nodes
- Akka Streams: How to form inlets and outlets for a Graph using a Flow
- How do I seek to end of a kafka topic when I am creating a new consumer in an existing consumer group with akka streams?
- How to run a scheduled functions when akka actor system terminates
- TCP IO Akka socket connection closed is not called when Internet is down
- How to determine when message was sent in Akka
- scala akka how to catch ActorInitializationException when using ask pattern
- How to resolve this Future when passing it down to my view page
- How do I pass a callback function to an akka actor constructor when using Context.actorOf?
- Akka HTTP: How to have the flow Http().superPool() not throw exceptions when encountering a bad URL?
- How to properly construct Akka Graph
- Reactive akka stream : How to delay the graph shutdown until the source has dried out?
- How to calculate TP, TN, FP and FN with spark and scala when I have predictions and ground truth file ( original graph )?
- Akka Streams - Understanding when and how materialisation works
More Query from same tag
- Odd NullPointerException when reproducing a Java OpenGL ES 2.0 demo in Scala
- Scala - change/add behaviour to a static method
- How to fill missing values with values from other dataframes
- How to publish from sbt-native-packager to Google Container Engine?
- How to do some cleanup after the client closes the connection
- Window Functions partitionBy over a list
- Cast or convert a list of String to a user defined object in Scala
- How to read from and write to multiple subfolders?
- What's point in receiving a `PrefixMap` and returning a empty `PrefixMap`?
- Scala Lift: How to wrap REST responses into an XML root element?
- How to get match type with multiple type parameters to work correctly in Scala 3
- Why Scala Infer the Bottom Type when the type parameter is not specified?
- spark context cannot reslove in MLUtils.loadLibSVMFile with Intellij
- Load view classes dynamically in Play using reflection in java
- Error when I use my val in function, but not when I access val on its own in REPL.
- How to pass command line input in Gatling using Scala script?
- scala for/yield loop vs java for loop (initial title "recursive value yyy needs type", despite type already stated)
- How to copy matrix to column array
- Advantages of F-bounded polymorphism over typeclass for return-current-type problem
- Future.successful(Failure(Exception)) vs just Future.failed()
- Scala: Make covariant type invariant
- Splitting routes with prefix not working in Play 2.7 (worked in 2.6)
- Akka ClusterSingletonProxy to a remote deployed singleton
- Reestablish link between path dependent type and its parent at runtime?
- eclipse scala plugin console cannot display hebrew characters
- Scala JSON Writes with calculated values
- Efficient way to select a subset of elements from a Seq in Scala
- Scala Parser Combinators <~ ~>ignores all previous statements
- Scala, error on * (asterisk) char using scala.sys.process
- Delta encoders: Using Java library in Scala