Encapsulate messageHandlers to support multiple graphs.