add interface for get msg's size of head