Massage code to add the Pid in the right place, and look for the broker.