Added middleware to consumer service.