Annotation based message codec