Refactoring queue connection to make it test friendly