Split out writing message type and payload so compression or encryption could be implemented cleanly and separately
Use default methods for MessageCodec;  delete logging