Hello!
UnboundedPriorityMailbox has the option to prioritize messages by type (like int string etc.),
BUT
Is it possible to prioritize messages by type of class property?
I mean ,
i know that option is available:
case x: Int => 1
// String Messages
case x: String => 0
// Long messages
case x: Long => 2
// other messages
case _ => 3
And the order(priority) of the messages will be :
myPriorityActor ! “Hello”
myPriorityActor ! “I am priority actor”
myPriorityActor ! “I process string messages first,then integer, long and others”
myPriorityActor ! 5
myPriorityActor ! 3
myPriorityActor ! 1
myPriorityActor ! 6.0
myPriorityActor ! 5.0
Link to example :
But I would like to know if I can prioritize the queue by type of Class.Property
example :
case x: Student.name=> 1
// String Messages
case x: Student.salary=> 0
// Long messages
case x: Student.School=> 2
Is such thing possible ?