This was exactly how I tried to get it running ;) But I get some compiler 
error, when I chained them 

When I used it this way
    val source = system.actorOf(Props[ProducerActor])
   val sourceAndDestination = 
system.actorOf(Props[ConsumerProducerActor])// class 
ConsumerProducerActor() extends  ActorProducer[Int] with ActorConsumer{....}
   val destination = system.actorOf(Props[ConsumerActor])
   ActorProducer[Int](source).produceTo(*ActorConsumer*
[Int](sourceAnddestination)).produceTo(ActorConsumer[Int](destination))
I got 
   value produceTo is not a member of Unit [error] 
  
and when I tried it that way
   ActorProducer[Int](source).produceTo(*ActorProducer*
[Int](sourceAnddestination)).produceTo(ActorConsumer[Int](destination))
 
I got

  found   : org.reactivestreams.api.Producer[Int]
  required: org.reactivestreams.api.Consumer[Int]
  

Anyway its great to see that already a lot of things are working! Looking 
forward for the next releases. 
I love the idea of  having the possibility to generate back pressure to 
certain actors. 

Am Mittwoch, 18. Juni 2014 13:37:24 UTC+2 schrieb Patrik Nordwall:
>
>
>
>
> On Wed, Jun 18, 2014 at 1:28 PM, Akka Team <[email protected] 
> <javascript:>> wrote:
>
>> Hi Wolfgang,
>>
>> A Consumer is a final element of a stream, it just consumes elements but 
>> does not produce any, therefore it is not possible to chain them. 
>> Processors are allowed to be chained though (they are Producers and 
>> Consumers at the same time), but what you really want is the Flow API. You 
>> can say
>>
>> Flow(producer).map(...).filter(...) (and so on) .produceTo(materializer, 
>> consumer)
>>
>> And that basically chains several processing steps between producer and 
>> consumer.
>>
>
> Right, but it's an interesting thought to have a Processor backed by a 
> user defined actor. Might even work today with:
> MyProcessor extends ActorProducer with ActorConsumer
> ?
>
> /Patrik
>
>>
>> -Endre
>>
>>
>> On Wed, Jun 18, 2014 at 8:46 AM, Wofr <[email protected] 
>> <javascript:>> wrote:
>>
>>> Hi!
>>>
>>> I just played a little with the new 0.3 release of akka-stream and I was 
>>> wondering if it would be possible in the future to chain ActorProducers and 
>>> ActorCustomers.
>>>
>>> So far I was able to connect a producer with a consumer like this
>>>
>>>  ActorProducer[Int](source).produceTo(ActorConsumer[Int](destination))
>>>
>>> but I failed to build a kind of chain of Producers and Consumers
>>>
>>>
>>>  
>>> ActorProducer[Int](source).produceTo(ActorConsumer[Int](sourceAndDestination)).produceTo(ActorConsumer[Int](destination))
>>>
>>> Do you thinking of supporting such chains? ..or maybe you already do and 
>>> I didn't get it.
>>>
>>> Regards
>>>
>>> Wolfgang
>>>
>>> -- 
>>> >>>>>>>>>> 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] <javascript:>.
>>> To post to this group, send email to [email protected] 
>>> <javascript:>.
>>> Visit this group at http://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>> Akka Team
>> Typesafe - The software stack for applications that scale
>> Blog: letitcrash.com
>> Twitter: @akkateam
>>  
>> -- 
>> >>>>>>>>>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> 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