Start creating an event handler for different types of messages.