efactoring of PmMessageUtil to PmMessageApi