Implement message writer.