mod thrift code,use message begin and end