Adapted to the changes of the Message class in beam-common.