Implement message writer.

this is awesome