Bunch of work around mqtt connections.