add immutable support to BaseMessage

Hi Tim.
Please take a review. just make a little change to the BaseMessage for immutable message.