Added brokerUrl check and error when it is missing.