scala - Akka - how to check how long a message was in inbox? -
how check in akka how long message in inbox? want make log message if message in inbox long. like:
override def receive: receive = { case message => val timeininbox = ... if (timeininbox > treshold) log.warn("bla bla bla doom coming")
there metrics / telemetry libraries available can provide information. 1 kamon.io (open source), gives "time-in-mailbox" metric, see http://kamon.io/documentation/kamon-akka/0.6.6/actor-router-and-dispatcher-metrics/
another 1 (non-free, closed source) "lightbend telemetry", calls "mailbox time", see http://developer.lightbend.com/docs/monitoring/latest/instrumentations/akka/akka.html#actor-metrics
Comments
Post a Comment