added support to optional message attribute to publish