Same as mentioned above. We should have a single self.on() definition for the messages and do the handling of messages inside a switch for each type of message, eg. update_memory, update_cylce_collector.