I think it is better to serialize / deserialize retMsg even if blank.
i.e. expect there to be a string on deserialization, rather than test msg.remaining() ..

It makes it cleaner/easier to extend it if necessary if not conditional.