share termination message logic between message classes