Hi Andre,

the signature has been changed to enable re-materialization of that source.
This allows to freely share the source between various parts of the code. I
would suggest not only wrapping the ResultSet in a source but also query
execution. In that case materializing such a source would run a DB query
and fetch results - making it reusable.

BTW, I think pre-release versions of Slick 3 come with the reactive-stream
interface implementation, which means you can use Slick with akka-streams
directly. Did you considered using Slick 3?

On Thu, Mar 19, 2015 at 9:31 AM, <[email protected]> wrote:

> I have been looking at akka-streams 0.7 and there used to be
> IteratorSource which could be used by passing Iterator. akka-streams 1.0-M4
> no longer has IteratorSource but it has a Source object that takes function
> which produces an Iterator.
> Is main reason reason for this so that Iterator could be created more than
> once when multiple Subscribers subscribe?
>
> Is there a way to create Source from Iterator that I do not want to create
> more than once? Basically, given Iterator that wraps ResultSet I don't want
> akka-streams to create it more than once.
> I'd rather stay away from implementing Publisher as Slick does in order to
> ensure once Subscriber.
>
> Thanks you,
> Andre Piwoni
>
> --
> >>>>>>>>>> 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 post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Martynas Mickevičius
Typesafe <http://typesafe.com/> – Reactive
<http://www.reactivemanifesto.org/> Apps on the JVM

-- 
>>>>>>>>>>      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 post to this group, send email to [email protected].
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