@bishnup wrote:
My use case is I want to create an Akka stream in which the source is a java Queue. The stream should keep on the pooling values from the queue and if the queue is empty then wait for the values in the queue. Akka stream queue is another option but if in case of any failure I want to store the values that are there in the queue (I don’t know how to do that with Akka stream Queue). I tried the following:
val source: Source[String, NotUsed] = Source.from(queue) source.ask(1, actor, classOf[String], 10 seconds).runWith(Sink.ignore(), mat)
I tried setting
idleTimeOut
andkeepAlive
properties but it is not working. The stream goes to Done state if there is no values in the queue.
Posts: 3
Participants: 2