router – Router¶
Routes messages to workers (that are in named queues).
-
class
eventmq.router.Router(*args, **kwargs)¶ A simple router of messages
This router uses tornado’s eventloop.
-
__weakref__¶ list of weak references to the object (if defined)
-
on_inform(sender, msg_id, msg)¶ Handles a new worker coming online
-
on_receive_reply(msg)¶ This method is called when a message comes in from the worker socket. It then calls on_command. If on_command isn’t found, then a warning is created.
- def on_inform(msg):
- pass
-
on_receive_request(msg)¶ This function is called when a message comes in from the client socket. It then calls on_command. If on_command isn’t found, then a warning is created.
-