It seems that hostByName does not make use of mDNS.
Even if it did, he's still got a problem...
const char* mqttServerName ="servername";
Do you mean "servername.local"? What IS your actual, full, correct servername? What is the name you are trying to resolve?