Hi Alexey,

On Mon, Jun 9, 2014 at 6:48 AM, Alexey Romanchuk <[email protected]
> wrote:

> Hello hakkers!
>
> I have check ActorConsumer trait in 0.3-SNAPSHOT and 0.3 release and API
> looks strange for me. In then one hand we have FlowMaterializer that manage
> how flow will be materialized and in then another RequestStrategy from 
> ActorConsumer.
> It looks like both of them are manage ways how messages will flow in flow.
>

Yes, rather similar.


>
> Here it is the short example:
>
>   val source = as.actorOf(Props[ExternalAPI])
>   val saver = as.actorOf(Props[SlowSaver])
>   val materializer = FlowMaterializer(MaterializerSettings(
>     initialInputBufferSize = 8,
>     maximumInputBufferSize = 8
>   ))
>
>   Flow(ActorProducer[Int](source))
>     .produceTo(materializer, ActorConsumer[Int](saver))
>
> In this example settings defined by materializer does not used at all. Am
> I right? If yes maybe we should try to find way to merge them together?
>

In the above example you would not use a Flow at all. You can use:
ActorProducer[Int](source).produceTo(ActorConsumer[Int](saver))

MaterializerSettings is for controlling how the steps (e.g. map, filter,
...) in the Flow are executed.
RequestStrategy is more flexible, to be able to have full control in the
actor of how elements are requested from the stream.


> Thanks!
>
> p.s. Sorry if it is wrong list for this question.
>

It is the right list.

Cheers,
Patrik


>  --
> >>>>>>>>>> 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.
>



-- 

Patrik Nordwall
Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
Twitter: @patriknw

<http://www.scaladays.org/>

-- 
>>>>>>>>>>      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