Listen to message from the users and emit events basded on it.