Terminated actors are automatically unsubscribed from event bus.

/Patrik

tors 17 nov. 2016 kl. 09:17 skrev Jithin Thomas <[email protected]>:

> Hi all,
>
> I'm fairly new to Akka. So, please let me know if this question has been
> answered elsewhere.
>
> I'm building a web server application using Scala Play and Akka.
> Within the server, I have a couple of Kafka consumers that read messages
> from certain Kafka topics.
> I also have multiple clients that open websocket connections (as actors)
> to the server.
> As each message is read from Kafka, the server should send the message to
> all or a subset of the clients via the respective websockets.
>
> From what I've read online, I feel it would be a good idea to use the
> EventBus feature of Akka as follows:
> - each Kafka topic would correspond to a unique channel in the EventBus.
> - each client would subscribe to channels of its choice.
>
> *Questions*
>
> (a) Does it make sense to use an EventBus in this scenario? Or have I
> misunderstood the purpose of EventBus?
> (b) When a client closes its websocket connection, would that websocket
> actor be automatically unsubscribed from the EventBus?
> (c) If the answer to (b) is 'No', then how do I ensure that the stopped
> actor has been removed from the list of subscribers?
>
> Thanks,
> Jithin
>
> --
> >>>>>>>>>> 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.
>

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