[akka-user] Streams M4: Reasons behind the new MAT type parameter/why does .to default to Keep.left?
I'm trying to better understand the new api. If I got it right, the new type parameter of the various stream components represents the type of what's materialized by that component when the stream is run (materialized). E.g.: A Source(actorProducerProps) has the actorRef as its materialization. Now I have two questions: 1) In which cases could it be useful to know the materialization type of intermediate components? I mean, as a stream consumer (i.e. client, in a generic sense), if someone gives me a Source[T,M], I should only know that it produces T elements, the M type looks like implementation detail. What am I missing? 2) Why does .to default to Keep.left? Aren't we almost always interested in the materialized result of Sinks (right)? I see a lot of [T, Unit] around. Thanks! G -- 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.
[akka-user] [Streams 1.0-M4] Using Balance to partition to independent sinks
Hi, I have a use case that I believe Akka Streams may be well suited for, but I'm not clearly seeing how to implement part of it from reading the documentation. I have a single, finite input source from an iterator stream. I want to use Balance to split this stream into N partitions and then be able to feed these stream partitions each into a RunnableFlow that would be executed on its own node in a distributed system. in ~ balance.out(0) ~ sink0 balance.out(1) ~ sink1 ... balance.out(n) ~ sinkN I have some rough code sketched together, but I think I'm missing some concepts to tie everything together. Runtime complains about the inlet for the UniformInOutShape which I'm assuming is what I have in the inputGraph. Any nudge in the right direction would be appreciated: val iteratorBuilder: () = Iterator[T] = ??? val inputGraph: Graph[UniformFanOutShape[T,T], Unit] = FlowGraph.partial() { implicit builder : FlowGraph.Builder = import FlowGraph.Implicits._ val stream: SourceShape[T] = builder.add(Source(iteratorBuilder)) val balance = builder.add(Balance[T](numPartitions)) stream ~ balance balance } partitions = (0 until numPartitions).map(i = { val sink : Sink[T, Future[Stream[T]]] = Sink.fold(Stream.empty[T]) { (v, e) = v.+:(e) } val outFlow: RunnableFlow[Future[Stream[T]]] = FlowGraph.closed(sink) { implicit builder : FlowGraph.Builder = sink = import FlowGraph.Implicits._ val balance = builder.add(inputGraph) balance.out(i) ~ sink } new Partition(i, outFlow) }).toArray -- 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.
[akka-user] GSOC(2015)
Hello, I would like to ask if anyone from Akka Team would like to be Google Summer of Code mentor this year? Cheers, Adam Kozuch -- 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.
Re: [akka-user] [Streams 1.0-M4] From Source[Future[T], Unit] to Source[T, Unit]?
I think the answer is in the {Scala, Java}Docs of mapAsync: Transform this stream by applying the given function to each of the elements as they pass through this processing step. The function returns a Future and the value of that future will be emitted downstreams. As many futures as requested elements by downstream may run in parallel and may complete in any order, but the elements that are emitted downstream are in the same order as received from upstream. The section on rate goes into greater detail: http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-M4/scala/stream-rate.html You can either go with the default demand as specified by your Materialization settings, use the default settings (default values in reference.conf), or manually specify a buffer downstream from your source to have greater control over buffering and generated demand. -- 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.
[akka-user] [Streams 1.0-M4] Compatibility with Akka-2.4-SNAPSHOT?
Are these 1.0-M4 modules intended to be compatible with akka-2.4-SNAPSHOT? I'm having trouble passing a custom materializer to an IncommingConnection.handleWithAsyncHandler(). The default materializer seems to work fine, but I wanted to play with buffer sizes. implicit val materializer = ActorFlowMaterializer() val matSettings = materializer.settings.withInputBuffer(16, 32) Http().bind(interface = 0.0.0.0, 5001).runForeach { conn = conn.handleWithAsyncHandler(r = Future(HttpResponse()))(ActorFlowMaterializer(matSettings)) }.onComplete(_ = actorSystem.terminate()) The fails at runtime with: java.lang.NoSuchMethodError: akka.pattern.AskableActorRef$.$qmark$extension(Lakka/actor/ActorRef;Ljava/lang/Object;Lakka/util/Timeout;)Lscala/concurrent/Future; at akka.stream.impl.ActorFlowMaterializerImpl.actorOf(ActorFlowMaterializerImpl.scala:185) at akka.stream.impl.ActorFlowMaterializerImpl$$anon$2.processorFor(ActorFlowMaterializerImpl.scala:92) at akka.stream.impl.ActorFlowMaterializerImpl$$anon$2.materializeAtomic(ActorFlowMaterializerImpl.scala:77) at akka.stream.impl.MaterializerSession$$anonfun$materializeModule$1.apply(StreamLayout.scala:336) at akka.stream.impl.MaterializerSession$$anonfun$materializeModule$1.apply(StreamLayout.scala:334) I couldn't find akka-stream or akka-http modules as part of the akka-2.4 distribution. Is there a better way to experiment with akka-streams and akka-http with akka-2.4? Aside from tweaking the handler's materializer, is there another way to control the amount of buffering/demand generated by the handleWith* constructs? -- 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.
Re: [akka-user] Dead letter JournalProtocol#WriteMessageSuccessful
Hi Anders, How are you stopping your actor. There is a difference between system.stop(actorRef) and actorRef ! PoisonPill. Calling stop is more direct and will as you say send a message, but that is an internal system message that will cut the line and be processed before normal actor messages. If you on the other hand sends the actor a PoisonPill, it will process all messages that it has in the inbox up until the PoisonPill, and then shut down. Please note that there can of course be messages enqueued after the PoisonPill that won't be handled. B/ On 27 February 2015 at 13:26:30, Anders Båtstrand (ander...@gmail.com) wrote: Dear users Sometimes I find dead letter JournalProtocol#WriteMessageSuccessful in my logs, after I have stopped my actor. As I understand it, stop involves a message send, so all write operations should be finished before the actor is stopped. How is it still possible to get this message AFTER my actor is gone? Regards, Anders -- 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. -- Björn Antonsson Typesafe Inc. – Reactive Apps on the JVM twitter: bantonsson JOIN US. REGISTER TODAY! Scala Days March 16th-18th, San Francisco -- 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.
Re: [akka-user] [Java 1.7.0_60][Play 2.3.5][AKKA 2.3.4] Suggestions for AKKA clustering approach in auto-scaled system.
Hi Anupam, Have you looked at the Reactivve Maps, Activator Tutorial http://typesafe.com/activator/template/reactive-maps ? It has the Play web front end talking to the back end using akka clustering. B/ On 27 February 2015 at 16:20:11, Anupam Sharma (anu.lnmiit.1...@gmail.com) wrote: Could you please suggest some appropriate AKKA clustering mechanism for the AKKA actor system ( description of which is given right after) used in conjunction with play framework. Description of our system. We have several AKKA actors(different actors for database interaction, XMPP interaction and some for supervision), which are fired once we get a web-service request on play-framework. We will be getting very few requests on play-framework and it will respond asynchronously to those and handover the lengthy handling of request to AKKA system. AKKA system should take some minutes to process one request fully. We get our web service requests at elastic load balancer which sprays the requests to instances running play server at its disposal. Play server running instances are part of a auto scaling group with minimum instances set to 2 ( More instances are spawned automatically if needed. ). Why We need AKKA Clustering approach We need AKKA clustering approach to scale AKKA system independently. If we just use Play framework's AKKA system we will be just putting the load on current instance ( instance which is running the play framework) while other instances may have not have any load. Thanks, Anupam -- 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. -- Björn Antonsson Typesafe Inc. – Reactive Apps on the JVM twitter: bantonsson JOIN US. REGISTER TODAY! Scala Days March 16th-18th, San Francisco -- 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.
Re: [akka-user] Advice on connecting spark-shell to a containerized standalone master
Hi Simeon, What you are experiencing is this the issue where the local address used to bind the akka actor system inside the docker container doesn't match up with the external address that is exposed by the host running docker, and that you are trying to connect to. Akka will then refuse to accept the incoming connection and messages, since they are clearly meant for another system with another address. This has been fixed in this ticket https://github.com/akka/akka/issues/15007 for Akka 2.4.x, but the feature is not available for 2.3.x. B/ On 27 February 2015 at 21:02:07, Simeon Fitch (fi...@datamininglab.com) wrote: I’m attempting to deploy Spark in stand-alone mode using Docker containers on CoreOS. I’ve got the master running fine, can connect to the web UI fine, but when I attempt to connect to it from spark-shell, from a non-local machine, the connection negotiation never completes. I’m launching the shell like this: spark-shell --master spark://172.17.8.102:7077. Here’s what I see on the master, right after I launch the spark-shell, but the connection never completes.. Feb 26 16:00:09 core-02 docker[26172]: 15/02/26 16:00:09 ERROR EndpointWriter: dropping message [class akka.actor.ActorSelectionMessage] for non-local recipient [Actor[akka.tcp://sparkMaster@172.17.8.102:7077/]] arriving at [akka.tcp://sparkMaster@172.17.8.102:7077] inbound addresses are [akka.tcp://sparkMaster@a9dcfc43a383:7077] Feb 26 16:00:28 core-02 docker[26172]: 15/02/26 16:00:28 ERROR EndpointWriter: dropping message [class akka.actor.ActorSelectionMessage] for non-local recipient [Actor[akka.tcp://sparkMaster@172.17.8.102:7077/]] arriving at [akka.tcp://sparkMaster@172.17.8.102:7077] inbound addresses are [akka.tcp://sparkMaster@a9dcfc43a383:7077] Feb 26 16:01:09 core-02 docker[26172]: 15/02/26 16:01:09 INFO Master: akka.tcp://sparkdri...@xyz.com:55541 got disassociated, removing it. Feb 26 16:01:09 core-02 docker[26172]: 15/02/26 16:01:09 WARN ReliableDeliverySupervisor: Association with remote system [akka.tcp://sparkdri...@xyz.com:55541] has failed, address is now gated for [5000] ms. Reason is: [Disassociated]. Feb 26 16:01:09 core-02 docker[26172]: 15/02/26 16:01:09 INFO Master: akka.tcp://sparkdri...@xyz.com:55541 got disassociated, removing it. The fact that something is logged immediately after spark-shell is launched indicates to me that packets are getting from the remote client to the master, but the connection negotiation never finishes. Can someone give me some hints as to what I might be doing wrong here? Thanks, Simeon -- 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. -- Björn Antonsson Typesafe Inc. – Reactive Apps on the JVM twitter: bantonsson JOIN US. REGISTER TODAY! Scala Days March 16th-18th, San Francisco -- 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.
[akka-user] Re: unstashAll() not queuing messages until actor death
Grr, so it seems that TestActorRef really is incompatible with Stash. http://stackoverflow.com/questions/18335127 This is a real shame. On Monday, 2 March 2015 12:35:22 UTC, Sam Halliday wrote: Wow, I think I figured this out... and it's quite scary. Stash needs an unbounded mailbox. I didn't quite pick up on this because somebody in our team had made the default dispatcher an unbounded mailbox at some point and now there is no going back. Then when I wanted to use TestActorRef, it blew up when I tried to create my actor because it uses an unbounded mailbox, so I had to give it a bounded mailbox to pass the test. *That seems to have disabled Stash without any warning* for this Actor. There seems to be several funky things going on here: 1. why doesn't initialisation blow up when I have an Actor with Stash used with an unbounded mailbox? 2. why is TestActorRef enforcing that unbounded mailboxes cannot be used? --- doesn't this mean that TestActorRef cannot be used to test an Actor with Stash? On Monday, 2 March 2015 12:13:40 UTC, Sam Halliday wrote: Looks like I'm seeing the same thing as https://groups.google.com/d/msg/akka-user/Vb2dQtZX6DI/lZtEvg8DwkkJ but I see the Awaken message immediately ... which means the `unstashAll` simply hasn't added anything onto the actor queue (until after the actor dies?) On Monday, 2 March 2015 12:05:52 UTC, Sam Halliday wrote: Hi all, I have an Actor which is using Stash and is working through two different Receive behaviours with context.become. Messages are stashed until we're ready to receive them. I've used context.become(), stash() and unstashAll() several times, so I'm pretty familiar with them, but I'm seeing a bizarre behaviour in this Actor and I was wondering if I'm using it wrong in a subtle way. In the part of the Actor code that is causing the problem, I am doing this: def catchUp: Receive = LoggingReceive { case item: PublishItem = stash() case event: Event = context.become(republishing) unstashAll() } def republishing: Receive = LoggingReceive { case event: PublishItem = downstream ! event case e: Event = // ignore leftover messages from the dying loader } In my test I send a bunch of PublishItem's, then send the Event that changes the behaviour. Then I assert that 'downstream' receives all the backlogged PublishItems. However, what I'm actually seeing are handled events for the PublishItem and Event into the catchUp behaviour. Then I see the test timing out waiting for the PublishItem to appear in downstream and then (the really weird bit) the actor is stopped and AFTER this actor stops, all the PublishItems show up in the dead letters mailbox. Any ideas? As a workaround, I am managing my own stash as a Queue, but this sucks because my stashed messages arrive after other messages that are already queued and that breaks the assumed logic of the whole actor. I'm using akka 2.3.9 on scala 2.11.5 Best regards, Sam -- 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.
Re: [akka-user] [Streams 1.0-M4] From Source[Future[T], Unit] to Source[T, Unit]?
You should use mapAsync instead of map. On 2 Mar 2015 18:03, kermitas kermi...@gmail.com wrote: Hello, as an input I have Source[PageDetails, Unit] and I also have method which transform PageDetails to Future[CategoryVector]: def categorizePage(page: PageDetails): Future[CategoryVector] By using map method I can change Source[PageDetails, Unit] to Source[Future[CategoryVector], Unit]: val sourceOfPageDetails: Source[PageDetails, Unit] = ... val notSomethingThatIWant: Source[Future[CategoryVector], Unit] = sourceOfPageDetails.map(categorizePage) ... but as an output I need Source[CategoryVector, Unit] (not Source[ *Future[*CategoryVector*]*, Unit]) :/. How can I solve this problem? Thanks, Arthur. -- 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. -- 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.
[akka-user] [Streams 1.0-M4] From Source[Future[T], Unit] to Source[T, Unit]?
Hello, as an input I have Source[PageDetails, Unit] and I also have method which transform PageDetails to Future[CategoryVector] : def categorizePage(page: PageDetails): Future[CategoryVector] By using map method I can change Source[PageDetails, Unit] to Source[Future[ CategoryVector], Unit]: val sourceOfPageDetails: Source[PageDetails, Unit] = ... val notSomethingThatIWant: Source[Future[CategoryVector], Unit] = sourceOfPageDetails.map(categorizePage) ... but as an output I need Source[CategoryVector, Unit] (not Source[ *Future[*CategoryVector*]*, Unit]) :/. How can I solve this problem? Thanks, Arthur. -- 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.
[akka-user] Re: Akka Cluster (and Cluster Client) on Kubernetes
Might want to look at this thread. https://groups.google.com/forum/#!topic/akka-user/wyA4xNfM5LM -- 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.
[akka-user] Re: Akka Cluster (and Cluster Client) on Kubernetes
Lol. Or not, since you're the OP. Oh well, need more coffee. On Monday, March 2, 2015 at 10:52:29 AM UTC-8, Jim Hazen wrote: Might want to look at this thread. https://groups.google.com/forum/#!topic/akka-user/wyA4xNfM5LM -- 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.
[akka-user] Akka Cluster (and Cluster Client) on Kubernetes
Howdy All, Has anyone had any experience getting an Akka Cluster and Cluster Client running on Kubernetes, e.g. on Google Container Engine (GCE)? I note the problem with Akka dropping messages when the host IP address doesn't match the container virtual IP address. I note the solution in Akka 2.4. I would most appreciate anyone confirming if they have an Akka Cluster running on Kubernetes (on GCE or not) and sharing any tips / hints. Thanks in advance, Ashley. -- 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.
Re: [akka-user] [Streams 1.0-M4] From Source[Future[T], Unit] to Source[T, Unit]?
THANK YOU Luis!! :) That is what I needed. Let's imagine that I have just one stream run in one JVM. Do you know how many futures will be evaluated and wait for completion? You know, I can not have billion of futures in memory :/. Will this be auto-regulated by back pressure of if not then where I can configure maximal number of futures? Thanks! W dniu poniedziałek, 2 marca 2015 19:32:32 UTC+1 użytkownik Luis Ángel Vicente Sánchez napisał: You should use mapAsync instead of map. On 2 Mar 2015 18:03, kermitas kerm...@gmail.com javascript: wrote: Hello, as an input I have Source[PageDetails, Unit] and I also have method which transform PageDetails to Future[CategoryVector]: def categorizePage(page: PageDetails): Future[CategoryVector] By using map method I can change Source[PageDetails, Unit] to Source[Future[CategoryVector], Unit]: val sourceOfPageDetails: Source[PageDetails, Unit] = ... val notSomethingThatIWant: Source[Future[CategoryVector], Unit] = sourceOfPageDetails.map(categorizePage) ... but as an output I need Source[CategoryVector, Unit] (not Source[ *Future[*CategoryVector*]*, Unit]) :/. How can I solve this problem? Thanks, Arthur. -- 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+...@googlegroups.com javascript:. To post to this group, send email to akka...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- 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.