message buffer using visitor pattern