Listen for messages and emit `message` event