Factor msg lines buffer from em_protocol