Re: [akka-user] Source of Future[Option[A]]

2017-09-11 Thread Richard Rodseth
Off the top of my head: not sure how you are getting the parameters, if any, to getNextItem, but since xxAsync methods like Source.unfoldAsync and mapAsync expect a future-returning function, I would use getNextItem (rather than identity) in one of those to give you downstream elements of type

[akka-user] Source of Future[Option[A]]

2017-09-11 Thread Ori Popowski
Hi, What is the correct way to create a source from a function which returns Future[Option[A]], besides a custom GraphStage? The source should emit A elements (not wrapped in Future[Option[]]). I considered a few options, none of them worked *First: using RestartSource*