Review message codec logic.
Merge remote-tracking branch 'origin/riversyang'