Add the transform_message method on publisher