Implement basic handler for processing messages.