Your actor is supposed to receive ActorPublisherMessage.Request message 
after the stream is materialized. At this point totalDemand should be > 0 
and you are allowed to call onNext

Can you show the code of your publisher actor?

Cheers,
Rafał

W dniu środa, 9 marca 2016 13:48:27 UTC+1 użytkownik Simão Mata napisał:
>
> Hello,
>
> I think I misunderstand the usage of ActorPublisher. I read the 
> documentation (
> http://doc.akka.io/docs/akka-stream-and-http-experimental/2.0.3/scala/stream-integrations.html#ActorPublisher)
>  
> but I cannot seem to understand how to use it.
>
> I am creating an ActorPublisher actor and creating a Source like this:
>
> val source = Source.actorPublisher(publisherProps)
>
> I then connect this source to a sink and run it: 
> source.runWith(Sink.ignore). But debugging the actor I can see that 
> totalDemand is always 0, so the actor never calls `onNext`. So what should 
> update the demand on the actor? Do I always have to connect an 
> ActorPublisher to an ActorSubscriber so that demand in ActorPublisher is 
> updated properly?
>
> Thank you.
>

-- 
>>>>>>>>>>      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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to