Add message event listening to the worker.