Martynas,

I have an existing function that creates Iterator that wraps ResultSet and 
I can pass this function to Source(f: () => Iterator) which would allow 
re-materialization. It makes sense though to execute query in hasNext as an 
optimization in case Iterator is never consumed. Given that I can pass 
function that creates Iterator wrapper for ResultSet, can I prevent 
re-materialization of such Source within the same execution of runnable 
flow. DatabasePublisher from Slick allows only one subscriber so this 
ensures that there are no concurrency issues. Unfortunately, Slick is not 
an easy option given existing investment in our database layer.

Here's an example of what I would like to accomplish() using akka-streams:

Source(() => myDataService.getIterator)) // Iterator.next() returns mapped 
entity

After this point in the flow, is there anything that I need to be aware of 
that may inadvertently trigger




Thank you for your response,
Andre

>  

-- 
>>>>>>>>>>      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 post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to