Could we explain what emq and setResolver do here? Grain of salt me, if you like.