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 
> <bishnu.pan...@flutura.com>:
> 
> 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 akka-user+unsubscr...@googlegroups.com.
> 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 akka-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/akka-user/5989C8D8-4D84-4A89-B6A1-9E62F2EBCC88%40gmail.com.

Reply via email to