Updated functions to take receive and publish containers as parameters