Implement message generation and reading