refactoring facebook producer