Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Akka actor drop messages from it's mailbox if needed?

Tags:

scala

akka

actor

For example, if I want to remove redundant messages from the queue - so that when actor recieves Connect message, it should inspect it's mailbox and remove other Connect messages, in order to do only one connect instead of several.

Is something like this possible?

like image 446
Rogach Avatar asked Mar 05 '13 08:03

Rogach


1 Answers

Yes, you can configure the actors dispatcher to have any mailbox of your choice, so if you implement such a mailbox, you can use that, see the following section of the documentation: http://doc.akka.io/docs/akka/2.1.1/scala/dispatchers.html#Mailboxes

like image 141
Viktor Klang Avatar answered Oct 17 '22 16:10

Viktor Klang