Here is the code for my actor: 
https://gist.github.com/simao/3003ee256751cfb7b2f7

If i put a log message on `deliverBuf` then I see that this method gets 
called for each event, but totalDemand is always 0.

Thank you for your help.

Simao



On Wednesday, March 9, 2016 at 10:41:13 PM UTC+1, Rafał Krzewski wrote:
>
> 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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
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