Replace KeyValueMap with MessageHandler