[#41447155] Throw an exception if the exchange is not set during publishing.