1

I have a Group actor with a custom routing logic implemented. I want to set up the logging so that I know exactly what messages transit through the router (and, possibly, to check where they are sent, but this would be a plus).

I know how to auto-log all messages received by an actor (enabling debug-receive in the config file), but this does not print out the messages received by a router (at least for me, I may have misconfigured something). This is my config file (relevant section only)

loglevel = DEBUG
log-dead-letters = on
debug {
   receive = on
   autoreceive = on
    unhandled = on
    router-misconfiguration = on
}

Does anyone know how to log all messages received by the router? And, if possible, also check whether the select method of the routing logic chose the "right" one (I tried println in the method but I received no output)?

Diego Martinoia
  • 4,592
  • 1
  • 17
  • 36

1 Answers1

1

To enable message logging modify your receive like:

def receive = LoggingReceive {
                // your normal receive here
              }

source

For routing actors one can supply an actor implementing RouterLogic in the RouterConfig routingLogicController()

/**

"Possibility to define an actor for controlling the routing logic from external stimuli (e.g. monitoring metrics)."

I assume that there are already some tools (e.g. Kamon) out there that will do the monitoring part for you, through instrumentation

Community
  • 1
  • 1
Ion Cojocaru
  • 2,583
  • 15
  • 16