refactored, added TaskService as a layer between producer and consumer