Fixing mqtt subscription in agents and event wireup