[akka-user] Re: [Akka-Streams] Want to always receive latest element in Sink

2018-01-31 Thread saloniv
Thanks for the answers @Tel Pressman and @Johannes Rudolph. I will try these approaches and write it here if they work. Thanks again. On Thursday, January 25, 2018 at 10:03:07 PM UTC+5:30, Johannes Rudolph wrote: > > Hi, > > in akka-stream, processing is usually run in a fused fashion, i.e.

[akka-user] Re: [Akka-Streams] Want to always receive latest element in Sink

2018-01-25 Thread 'Johannes Rudolph' via Akka User List
Hi, in akka-stream, processing is usually run in a fused fashion, i.e. without further configuration one stream will run in a single actor so all operations are run sequentially. In such a synchronous scenario, there's little room for elements to ever get dropped because the actorRef stage

[akka-user] Re: [Akka-Streams] Want to always receive latest element in Sink

2018-01-24 Thread Tal Pressman
Hi, I don't know if there is any built-in graph that does this, but you can implement your own graph stage for this fairly easily. You just need a stage with an Option[Value], in the onPush you either push the value downstream or store it, and in any case you pull. In the onPull you just have