Hi Felix, Thank you for the response. I went through the link that you have shared with me. But in the documentation, I saw that the queue is used as a flow in the example. But in my use case, I want to use the queue as an Akka stream source and then send it to an actor. It will be very helpful for me if you will just write a code snippet on how to implement that.
Regards, Bishnu On Wednesday, November 6, 2019 at 8:54:50 PM UTC+5:30, Felix Nensa wrote: > > You could wrap your queue in a GraphStage, which will give you a lot of > flexibility. > There are a lot of good examples (include some with queues) at > https://doc.akka.io/docs/akka/current/stream/stream-customize.html#custom-processing-with-graphstage > > > BR, Felix > > > Am 06.11.2019 um 16:14 schrieb Bishnu Shankar Pandey < > [email protected] <javascript:>>: > > > > Hi All, > > 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 and keepAlive properties but they are not > working. The stream goes to the Done state if there are no values in the > queue. > > > > > > > > > > > > Regards, > > > > Bishnu > > > > > > -- > > > ***************************************************************************************************** > > > > ** New discussion forum: https://discuss.akka.io/ replacing akka-user > google-group soon. > > ** This group will soon be put into read-only mode, and replaced by > discuss.akka.io > > ** More details: > https://akka.io/blog/news/2018/03/13/discuss.akka.io-announced > > > ***************************************************************************************************** > > > > >>>>>>>>>> > > >>>>>>>>>> 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] <javascript:>. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/akka-user/7b86524e-a5a1-4eca-9a7b-44377c122dff%40googlegroups.com. > > > > > > > -- ***************************************************************************************************** ** New discussion forum: https://discuss.akka.io/ replacing akka-user google-group soon. ** This group will soon be put into read-only mode, and replaced by discuss.akka.io ** More details: https://akka.io/blog/news/2018/03/13/discuss.akka.io-announced ***************************************************************************************************** >>>>>>>>>> >>>>>>>>>> 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 view this discussion on the web visit https://groups.google.com/d/msgid/akka-user/30390583-e53d-4345-af9e-d706aec7bf43%40googlegroups.com.
