broker service refactor