prepare MessageState for variable length messages