Refactoring to use one broker instance